Closed wponramp closed 3 years ago
Hello @wponramp as per your other Issue do you have any error code or anything specific you can share?
Without more information this is not helpful. Do you see errors in /var/www/logs/error.log
that might be related to this problem and might narrow down what is causing your problem? It is likely not SlickStack related.
Here's what I see in the error logs:
Stack trace: [24-Feb-2021 15:35:43 UTC] PHP Fatal error: Uncaught Error: Cannot unset string offsets in /var/www/html/wp-includes/class-wp-customize-widgets.php:1127
This is getting a bit outside of SlickStack territory I think, but I suggest the following:
If the problem disappears than either your WP core files were corrupted or a plugin is causing this issue.
Thanks for the suggestions. I tried all of them sequentially as recommended and still getting a critical error. I'll take it from here. Thanks again.
Hi guys,
I came across the same issue today with a new setup. Also for the Twenty Twenty Theme the issue is not resolved. There was a discussion on this topic on the WordPress support page 8 months ago. It seems to be related to ghost entries in the WP Cron option.
This might help https://wordpress.org/support/topic/fatal-error-uncaught-error-cannot-unset-string-offsets-2/
And another related discussion here https://wordpress.org/support/topic/invalid-empty-cron-events/
@jessuppi Is this error related to slickstack?
@wponramp Have you been able to resolve the issue?
@skilver-io Thanks for the information,
There are quite possibly erroneous entries in WP Cron caused by our default MU plugins, some of which have not been updated in a long while (and have some incomplete features, that we plan to abandon).
That being said, it seems strange that an invalid cron job could cause WordPress Core to malfunction. I haven't had time to dig into this further but if anyone has more feedback please comment here.
I was trying to dig a bit deeper into the issue today.
However I did some testing and came across the following findings on a fresh SS install:
Theme customizer is only working for the twenty twenty theme. All other default WP themes (e.g. twenty tenty one etc.) will throw an error in the theme customizer.
I deactivated all MU plugins step by step starting with the MU_PLUGIN_19
back up to the top in the ss-config file. The error for the theme customizer persists. Therefore I assume no issues with the MU plugins. However, there is one other issues I came across here: When I commented out the last MU_PLUGIN_01
, all plugins will be installed again after running sudo bash /var/www/ss-install-wordpress-mu-plugins
. Not sure if this is intended.
When installing a new theme, permissions are set to Chmod 644
(-rw-r--r--
) for all php files within the single theme's folder. I'd assume the correct permission would be Chmod 744
. However the twenty twenty theme also has the same 0644 permissions and the themes customizer works. I believe WP would also show an error message regarding a higher permission level needed if this would be the source of error.
@jessuppi I would love to help more but I am just not experienced enough in this matter. That's why I started using your slickstack in the first place =)
Is there any chance this helps to solve the issue quickly?
I could resolve the issue by the help of nakitai
from the SS Discord channel.
nakitai: ..slickstack has a plugin that deletes things like pages menus and widgets you would otherwise find in a fresh wordpress installation. However, some themes require these to work properly so before entering customizer make sure to have a dummy page, post, menu and a widget active.
I appreciate the research and follow-up posts @skilver-io
Based on your findings I have commented out the Throwaway Theme we had been adding by default (for now).
Ref: https://github.com/littlebizzy/slickstack/commit/df281911813901b7ee80aaefcec514b108111035
We had been planning to delete it anyways and convert some of the "cleanup" functions to basic Bash scripting, but based on this I will probably change it to avoid deleting the demo content in the new version...
Just an update that SlickStack no longer installs a "throwaway" WordPress theme (ever), and instead some of the wp_options
cleanup now happens in the ss-install-wordpress-core
script instead:
Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-install-wordpress-core.txt
This lightweight "cleanup" of wp_options
should only happen on virgin installs, where ss-install-wordpress-core
has never been run before (e.g. the timestamp file does not exist). I will also add an option in ss-config
to disable this functionality for anyone who doesn't want this to occur (I will follow up again).
Going forward, we won't delete any "demo" content from fresh WordPress installs to keep things more standard.
There is now a new option in ss-config
called SS_INSTALL_WORDPRESS_CORE_CLEANUP_OPTIONS
... set it to false
if you don't want ss-install-wordpress-core
to cleanup your options table for virgin installs.
Ref: https://github.com/littlebizzy/slickstack/blob/master/bash/ss-config-sample.txt
Getting a critical error on WordPress when trying to customize any WordPress theme.