Pages/posts not saving: Uh oh! Failed to save. [ERROR LOG PROVIDED]

I have read through a bunch of the forum topics and realize that mistakes happen with updates. I have updated my X Theme to 8.0.8 and Cornerstone to 5.0.8 after getting fatal errors. The fatal errors are gone, but now I can’t save any edits to the pages and posts. I tried deactivating all of my plugins with the exception of the Cornerstone plugin, and I’m still getting the same Uh oh! error. I enabled DEBUG mode and got 1499 lines of errors in my error log all pointing to the following:

Errors 1-1419: Plugin > Snippet => /functions/class-snippet-meta-box.php on lines 232, 235, 248, 252, 256, 260, 264, 267, 269…

Errors 1420-1499: Plugin > Cornerstone => various.

I have included the errors from the log as a secure note. Hopefully your developers can use it to fix the problems. We’re trying to get these updates done by the end of the day tomorrow as we will be off until the 4th. Thanks in advance, and hope that helps.

Thanks for sharing the error log! I’ve truncated it since I was able to correct those issues, although I don’t think they’re related to what you’re experiencing with not being able to save. Would you be able to test for a plugin conflict? This can be done by disabling all plugins and seeing if saving works. Then you can enable them one or two at a time and check saving between each activation. This will help narrow down if a specific plugin is preventing the save action from completing.

Hi @alexander, as I mentioned in my original post, I already tried that. I deactivated all of the plugins except the Cornerstone plugin and it still had the issue. Even with all of the plugins activated, I can actually save the page/post outside of Cornerstone, but that doesn’t help me as I need to edit in Cornerstone. Unfortunately I cannot save my Cornerstone edits. I just updated the theme to 8.0.4, but still having the same issues. I ran new error logs and most of the Cornerstone plugin errors are gone with 4 times as many errors with the Snippet plugin. I disabled the Snippet plugin this time, and the Uh oh! error persists. Here is the only Cornerstone plugin error left (repeated only 3 times):

[23-Dec-2020 04:26:28 UTC] PHP Notice: Undefined variable: type in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/views/styles/partials/_color-alt-css.php on line 19

Line 19 of this file:
$type = ( isset( $type ) && $type === 'color' ) ? $type : $type . '-color';

And in the Snippet file, all of the errors point to the same array with error (Trying to access array offset on value of type null):
<?php echo esc_attr( $metabox_value['date'] ); ?>

Looking at the rest of the file and comparing it to my log, I’m noticing similar values that are NOT in the error log:
<?php echo esc_attr( isset($metabox_value['validFrom']) && isset($metabox_value['validFrom']['date']) ? $metabox_value['validFrom']['date'] : '' ); ?>

Hi @tkulow,

Thank you for checking and for the additional information. Could you provide login credentials in a secure note so we can take a closer look? I don’t believe the remaining error warnings to be relevant to the saving issue since it happens with Snippet disabled.

Yes, but now we are having issues with the site having timed out errors.

EDIT: Just saw this other link (Newest Update - Unable to Save and Timeout Error After Update). I am having the same issues. My ISP and GoDaddy both say there is nothing wrong on their ends. Can I roll back to an older version for now? If so, how do I do this?

I realize you guys are trying your hardest to get everything cleared up, and I appreciate your hard work. Just to let you know where I’m at with this. I updated to 8.0.10/5.0.10. Still having problems with Time Out error and the inability to save on the same pages.

New errors:

[23-Dec-2020 22:12:56 UTC] PHP Notice: Undefined variable: post_type_obj in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158
[23-Dec-2020 22:12:56 UTC] PHP Notice: Trying to get property ‘hierarchical’ of non-object in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158
[23-Dec-2020 22:13:31 UTC] PHP Notice: Undefined variable: post_type_obj in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158
[23-Dec-2020 22:13:31 UTC] PHP Notice: Trying to get property ‘hierarchical’ of non-object in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158
[23-Dec-2020 22:25:43 UTC] PHP Notice: Undefined variable: post_type_obj in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158
[23-Dec-2020 22:25:43 UTC] PHP Notice: Trying to get property ‘hierarchical’ of non-object in /home/cngfoccykyf1/public_html/wp-content/plugins/cornerstone/includes/classes/content/class-content.php on line 158

This appears to be in your save() function. Line 158:
if ($post_type_obj->hierarchical && isset($settings['general_post_parent'])) { $update['post_parent'] = (int) $settings['general_post_parent'];}

Hi @tkulow,

Thanks for your appreciation and detailed report, it really help us to recognize the issue. I have tried to check the issue by cloning the page you specified, but unfortunately, your website starts showing the ERR_CONNECTION_TIMED_OUT error. Can you please check this and let us know once it is ready to access.

Thanks

Hello,
I am not currently experiencing the ERR_CONNECTION_TIMED_OUT error. However, continue to have issues with saving pages referenced above. Thank you for checking into this.

Hi @tkulow,

The reason behind the issue has been found by comparing the two pages you mentioned. The page with the issue is having two SVG icons in the 4th column of the footer which the cause of your issue, I would suggest you remove the custom code from the Text element and the image using the Image element to get rid of this.

Hope it helps.
Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.