[Support request] illegal string offset 'custom_css_post_ID' since recent update

Home Forums Support [Support request] illegal string offset 'custom_css_post_ID' since recent update

Home Forums Support illegal string offset 'custom_css_post_ID' since recent update

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #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!

    #761444
    Tom
    Lead Developer
    Lead Developer

    Hmm, 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.

    #761456
    Maarten 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.

    #761558
    Maarten Vandeplas

    FYI: the costumizer doesn’t function anymore neither, it keeps on loading.

    #761580
    Maarten 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 );
    }
    
    #761691
    Tom
    Lead Developer
    Lead Developer

    There’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?

    #762429
    Maarten 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.

    #762611
    Tom
    Lead Developer
    Lead Developer

    Do you have any custom functions or files in a child theme?

    You can set WP_DEBUG to false in your wp-config.php and the error should go away until you find the issue.

    #766984
    Maarten 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?

    #767146
    Tom
    Lead Developer
    Lead Developer

    Do 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?

    #771362
    Maarten Vandeplas

    Hello Tom, the changes don’t save in the Customizer and I don’t use caching

    #771536
    Tom
    Lead Developer
    Lead Developer

    Can 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.

    #787163
    Maarten 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 ๐Ÿ™

    #787189
    Tom
    Lead Developer
    Lead Developer

    Did 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?

    #1805332
    ruzek

    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.

Viewing 15 posts - 1 through 15 (of 29 total)
  • You must be logged in to reply to this topic.