- This topic has 28 replies, 6 voices, and was last updated 1 year, 12 months ago by
Tom.
-
AuthorPosts
-
December 19, 2018 at 9:46 am #761386
Maarten Vandeplas
Can you help me out? I’m pretty n00b ๐
Since I updated my website to Gutenberg my GeneratePress website looks pretty odd and I get a warning (illegal string offset ‘custom_css_post_ID’.
I searched for the particular line:$mods[ $name ] = apply_filters( “pre_set_theme_mod_{$name}”, $value, $old_value );
Here’s the link to my website: http://www.deheuvel.be
What’s going wrong and how can I fix this? Many thanks!December 19, 2018 at 10:51 am #761444Tom
Lead DeveloperLead DeveloperHmm, did you switch to a child theme/back to the parent theme from a child theme?
Your menu just looks like it’s missing a menu location. Try setting it to “Primary Menu” in “Appearance > Menus”.
Not sure about that notice though. Maybe try fixing the menu first and see if it goes away.
December 19, 2018 at 11:03 am #761456Maarten Vandeplas
Thanks for the help, Tom.
But unfortunately I didn’t change anything, just updated…
Tried to change the menu to primary as you suggested, but still the same.
I read an outdated PHP-version can be the cause, the server is running Php 5.6.38.
Maybe I should downgrade my WordPress version until this gets updated?Edit: in the meantime I tried to downgrade to 4.9.9 but the error was still there.
December 19, 2018 at 1:43 pm #761558Maarten Vandeplas
FYI: the costumizer doesn’t function anymore neither, it keeps on loading.
December 19, 2018 at 2:13 pm #761580Maarten Vandeplas
here’s the entire code
function set_theme_mod( $name, $value ) { $mods = get_theme_mods(); $old_value = isset( $mods[ $name ] ) ? $mods[ $name ] : false; /** * Filters the theme mod value on save. * * The dynamic portion of the hook name, <code>$name</code>, refers to the key name of * the modification array. For example, 'header_textcolor', 'header_image', * and so on depending on the theme options. * * @since 3.9.0 * * @param string $value The new value of the theme mod. * @param string $old_value The current value of the theme mod. */ $mods[ $name ] = apply_filters( "pre_set_theme_mod_{$name}", $value, $old_value ); $theme = get_option( 'stylesheet' ); update_option( "theme_mods_$theme", $mods ); }
December 19, 2018 at 6:11 pm #761691Tom
Lead DeveloperLead DeveloperThere’s nothing wrong with that core code – it’s just running some code on your site where the problem actually is.
Any custom functions on the site? Have you tried deactivating your plugins one by one to test for conflicts?
December 20, 2018 at 1:49 pm #762429Maarten Vandeplas
I tried to deactivate every plugin but it doesn’t change a thing.
I found out I cannot change the menu setting anymore, when I delete certain tabs or try to add a new menu and set this as primary it just doesn’t change and sometimes I get error warnings.
As I mentioned before the ‘costumizer’ doesn’t function neither.
There must be something wrong in the menu section but I cannot find out how to reset this. I already tried to reset menu plus costumizer options as well.December 20, 2018 at 10:00 pm #762611Tom
Lead DeveloperLead DeveloperDo you have any custom functions or files in a child theme?
You can set
WP_DEBUG
tofalse
in yourwp-config.php
and the error should go away until you find the issue.December 27, 2018 at 12:27 pm #766984Maarten Vandeplas
Hello, I made some steps forward by upgrading the server to PHP 7: now the costumizer is functioning properly again and all the errors are gone. However I still cannot change the primary menu nor can I change my ‘site identity logo’: it shows properly in the costumizer, but when I set my menu as primary menu or add my site logo and try to save nothing changes… is there any way to fix this?
December 27, 2018 at 4:36 pm #767146Tom
Lead DeveloperLead DeveloperDo the changes save in the Customizer? So if you leave the Customizer and come back, your logo/menu are still set?
If so, are you using a caching plugin/server caching?
January 2, 2019 at 10:45 am #771362Maarten Vandeplas
Hello Tom, the changes don’t save in the Customizer and I don’t use caching
January 2, 2019 at 3:37 pm #771536Tom
Lead DeveloperLead DeveloperCan you turn on WP_DEBUG?: https://codex.wordpress.org/Debugging_in_WordPress
Set
WP_DEBUG_LOG
to true as well, and then try to make those changes.Then, go to
wp-content/debug.log
and look for any errors.January 20, 2019 at 9:28 am #787163Maarten Vandeplas
I’m sorry to disturb you again but unfortunately not making any progress here. When I change to an original theme the said error goes away and I can set my menu as primary menu. When activating GP theme all works fine in the customizer, but when changing the menu or the site logo it doesn’t save (all the rest does save properly) and the said error always shows up – disabling plugins doesn’t help ๐
January 20, 2019 at 9:50 am #787189Tom
Lead DeveloperLead DeveloperDid you end up turning on
WP_DEBUG
as I mentioned above?Perhaps there’s some sort of weird server bug happening? Do you have another server to test on?
May 31, 2021 at 7:15 pm #1805332ruzek
Hey friends,
I am also getting this error message:
Warning: Illegal string offset 'custom_css_post_id' in /var/www/vhosts/mysitehere/wp-includes/theme.php on line 1063
This is with GeneratePress 3.0.3, GP Premium 2.0.2 and Happyforms (free) 1.12.9 active. I’ve deactivated all other plugins, except for Jetpack and Health Check.
-
AuthorPosts
- You must be logged in to reply to this topic.