Jump to content
Nelly111s

Can't save in Admin part of site

Recommended Posts

I've been doing a few updates of my site, which included a new template and links to the social media sites I have. I've managed to update the template and css and everything on that side seems to work OK. However, when I try to load the old template or even the default foundation one, neither of them now work - when I click save, it reloads the page but with the new template selected. 

I'm having the same problem with the social media sites. I put in the Instagram one and that worked. Now if I try any of the others, it won't save the text I put in.

 

Very strange!

Share this post


Link to post
Share on other sites

I've tried clearing the caches, leaving the site for a day and trying again. The social media sites in Store settings > general aren't storing. When I click "Save", I get the usual message to say that the settings have been updated, but actually, they haven't. There is no text in the boxes (eg Facebook) that I filled in and after clearing the cache, if I open my homepage, there's only the original Instagram link there, not any new ones.

Has anyone got any thoughts on how I can diagnose the problem?

I've noticed a few errors in the Maintenance > Database tab. These may or may not be related to the problem

The errors are

CubeCart_admin_users.admin_id has a key type KEY but expecting PRIMARY.

CubeCart_inventory.popularity has no key set. Expecting KEY.

CubeCart_order_summary.cart_order_id has a key type KEY but expecting UNIQUE KEY.
CubeCart_order_summary.custom_oid has a key type KEY but expecting UNIQUE KEY.

CubeCart_reviews.approved has no key set. Expecting KEY.

CubeCart_seo_urls.type has no key set. Expecting KEY.
CubeCart_seo_urls.item_id has no key set. Expecting KEY.

 

Edited by Nelly111s
Errors added

Share this post


Link to post
Share on other sites
29 minutes ago, Nelly111s said:

I've noticed a few errors in the Maintenance > Database tab. These may or may not be related to the problem

They are not related to your problem but it is a good idea to fix these issues all of which will be slowing your site down because indexes on tables that CubeCart needs to quickly find records in the database are missing.  So to find a record it means searching the whole table each time - not a problem if there are only a few records in a table but when you get to hundreds, thousands or tens of thousands (especially if two or more tables are in a JOIN statement are missing indexes when all table record numbers are multiplied which quickly gets to stupid numbers  !)

There is no problem with changing and saving social media details in standard core CubeCart so possibly some changes you have made or your hosting environment is causing a problem when saving these details - you would expect issues like that to be visible in other areas as well and not just that one specific place

Share this post


Link to post
Share on other sites

Thanks for the help. The only change recently has been to update the version of PHP to 7.2, but I doubt that's caused it. I'll ask my hosting provider.

 

Do you have any idea why the tables may have lost their indices?

 

Share this post


Link to post
Share on other sites

I created the file and the error log was created

contents are

[10-Sep-2019 23:15:54 Europe/London] PHP Notice:  No image mode set in /home/sites/olivewoodturning.co.uk/public_html/classes/catalogue.class.php on line 1487

Share this post


Link to post
Share on other sites

Switching php versions will not affect missing database indexes - they were missing before but it is simple to add them via phpmyadmin 

Share this post


Link to post
Share on other sites

As to the inability to save new info to the store settings (this is the 'config' repository), CubeCart places a limit on the total size of all that data: 64K bytes.

Apparently, you have some store setting info that is huge.

Look at admin, Store Settings, Search Engines tab. Do you have thousands of words here? What about the Offline tab? A lot of stuff here? Copyright tab?

The 'No Image Mode Set" message indicates that this version of CubeCart wants to use a specifically-named size of image, but your skin does not provide it. This is just a Notice, so no harm done. But you may want to add this to the skin you are using:

In the skin's config.xml file, if the following
is not already present, add:

<image reference="checkout" maximum="50" quality="80" default="noimage.png" />

What skin are you using? Olive Wood Turning looks to be using Foundation, which should have all the proper named image size references in the config.xml file.

 

Edited by bsmither

Share this post


Link to post
Share on other sites

Also, fix these two undesirable mistakes:

From within CubeCart, admin, Images, create a new folder /Bowl_Blanks/. Move all the images from /Bowl Blanks/ into it. Then delete /Bowl Blanks/. Try very hard to not use spaces in folder and file names. Use underscores.

From within CubeCart, admin, Images, delete /Timber/Bowl Blanks/Bowl_Blank__2_-3877.jpg and any other image which the size is larger than approx 350KB. CubeCart wants to make smaller versions, and uses the GD Image library to do it. However, first, the source image will get uncompressed in PHP's memory. That image will suck up 8MB and will probably cause PHP to run out of memory. Suggest using a source image that is closer to 700 pixels on its longest side.

 

Share this post


Link to post
Share on other sites
1 hour ago, bsmither said:

As to the inability to save new info to the store settings (this is the 'config' repository), CubeCart places a limit on the total size of all that data: 64K bytes.

Apparently, you have some store setting info that is huge.

Look at admin, Store Settings, Search Engines tab. Do you have thousands of words here? What about the Offline tab? A lot of stuff here? Copyright tab?

The 'No Image Mode Set" message indicates that this version of CubeCart wants to use a specifically-named size of image, but your skin does not provide it. This is just a Notice, so no harm done. But you may want to add this to the skin you are using:

In the skin's config.xml file, if the following
is not already present, add:

<image reference="checkout" maximum="50" quality="80" default="noimage.png" />

What skin are you using? Olive Wood Turning looks to be using Foundation, which should have all the proper named image size references in the config.xml file.

 

I can't find any store setting that is big. I've only got a couple of sentences in the Search Engines and it's not been changed recently. Nor the Offline and Copyright tabs, both are very small. Is the config info written to the dB? Can I erase it and start again to see if it errors straight away?

I looked in phpMyAdmin and in the Cubecart_Config table, the Config variable has masses of text in it. Other variables are small by comparison.  Not sure if this is relevant.

The config.xml for the foundation skin doesn't have the image reference line. I created my own skin (a copy of foundation with some colours changed, that's all) and that doesn't have the line either. The site is currently using foundation, but the site settings problem is preventing me from changing the skin anyway.

1 hour ago, bsmither said:

Also, fix these two undesirable mistakes:

From within CubeCart, admin, Images, create a new folder /Bowl_Blanks/. Move all the images from /Bowl Blanks/ into it. Then delete /Bowl Blanks/. Try very hard to not use spaces in folder and file names. Use underscores.

From within CubeCart, admin, Images, delete /Timber/Bowl Blanks/Bowl_Blank__2_-3877.jpg and any other image which the size is larger than approx 350KB. CubeCart wants to make smaller versions, and uses the GD Image library to do it. However, first, the source image will get uncompressed in PHP's memory. That image will suck up 8MB and will probably cause PHP to run out of memory. Suggest using a source image that is closer to 700 pixels on its longest side.

 

I'll fix the folder names over the next day or so, but they've been like that for a year or more. I've just resized all my images (gulp!) to be 350Kb, 800px, but that doesn't seem to have fixed it either.

Thanks for your continued help

Edited by Nelly111s
added lines about database and more lines re config

Share this post


Link to post
Share on other sites

In the CubeCart_config database table, the row that has config in the 'name' column. Seriously, do not delete or blank out the value in the 'array' column.

"the Config variable has masses of text in it"

For example? Which setting has a massive amount of text associated with it. Keep in mind that, in its raw state, the contents in the 'array' column are base64 encoded. When looking at the table in phpMyAdmin, if you click in the cell containing a value, there may be a means of having phpMyAdmin show you the contents in a popup window that has been base64 decoded.

From that popup (or whatever), you see the JSON format of the settings array. Scan through the text looking for what may be incredible amounts of characters for a particular config setting.

The image sizes are not causing this problem.

Edited by bsmither

Share this post


Link to post
Share on other sites

In the table the row with name "config" .(as per attached) has a large amount of text in the array.

 

Config_table.jpg

Here is the text in the array, when I use phpMyAdmin

 

Thanks for confirming about the image sizes, but I needed to fix them anyway (and I've now got peace of mind that one problem has gone)

Share this post


Link to post
Share on other sites

Your offline content is rather large. I would suggest that you create a file named offline.html, place the content of the Offline tab's editor (copy it from Source mode) into the file, then replace the editor's content with a simple "The store is offline."

On the other hand, there is an incredible amount of cruft in the Offline content. Deleting all of the blank paragraphs will trim the size considerably.

When the store is offline, CubeCart first checks the main folder for the presence of "offline.php" (or htm, html, txt suffixes) and if found, will send that out to the browser.

However, the total size of the base64 encoded array for 'config' is 42KB, less than the 64KB limit. So, there must be something strange being added to the 'config' array in memory that makes this size bigger, and fails when ready to write it to the database.

Everything else looks good.

Share this post


Link to post
Share on other sites
3 hours ago, bsmither said:

Your offline content is rather large. I would suggest that you create a file named offline.html, place the content of the Offline tab's editor (copy it from Source mode) into the file, then replace the editor's content with a simple "The store is offline."

On the other hand, there is an incredible amount of cruft in the Offline content. Deleting all of the blank paragraphs will trim the size considerably.

When the store is offline, CubeCart first checks the main folder for the presence of "offline.php" (or htm, html, txt suffixes) and if found, will send that out to the browser.

However, the total size of the base64 encoded array for 'config' is 42KB, less than the 64KB limit. So, there must be something strange being added to the 'config' array in memory that makes this size bigger, and fails when ready to write it to the database.

Everything else looks good.

I've deleted all of the content and just left a couple of lines. I've not used that since July, so not sure how it's been corrupted.  Do you know how it could have happened? The only thing I can think of is that I use Grammarly and they have recently altered their mode of operation within Safari and there was definitely a reference to them in the source code - bit of a long shot though

But, the great news is that the settings now work OK. I can save both the new skin as a default and the social media links.

Sorry if I shouldn't have posted the contents of the table - I assume if you could decode it that there was "sensitive" data in there?

 

2 hours ago, havenswift-hosting said:

Your wish is my command ! Done

Thanks for your help - I've been at work (trying to make some products to put on the site!)

I've still got a database problem though - I'll start a new thread for that, though.

 

Edited by Nelly111s
added text re Grammarly

Share this post


Link to post
Share on other sites

As an aside, I have noticed that on occasion the CKEditor will seem to "double" the number of blank paragraphs. I wanted to report this but couldn't get a reliable reason why it happens. As the Offline Content editor is in the Store Settings group of panels, this anomaly would happen (when it did) when saving those settings, even when not having viewed that panel at all.

Share this post


Link to post
Share on other sites

I'm not sure if I've found something else that may or may not contribute to the issue. The image file manager is reporting the wrong values for filesizes. I updated all the images to make them smaller, but the file manager is still listing the old sizes, not the ones that my FTP client reports (which are the same as my cPanel filemanager.) Could this have contributed to the warnings in the error log (and do you know how to fix it)?

Share this post


Link to post
Share on other sites

As the CubeCart code is now, the filesize is informational only. It does not affect how CubeCart handles the images.

Only when you use CubeCart's Image Upload will CubeCart determine and update the row in the database to hold the calculated filesize.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...