PHP Warning -> Undefined index: body_class

Home Forums Modern PHP Warning -> Undefined index: body_class

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #19462

    zoehex
    Participant

    PHP Warning -> Undefined index: body_class

    Resolved

    Hello, while I am editing the website with the installed modern theme, this warning appears on the top of the wp-admin menu.

    Notice: Undefined index: body_class in /storage/***/public_html/wp-content/themes/modern/library/includes/classes/class-visual-editor.php on line 438

    Is it possible to fix that with ease? Thank you very much!

    #19471

    Oliver Juhas
    Keymaster

    Hi zoehex,

    This issue seems to be related to Gutenberg. Are you trying to use Gutenberg on your website? If you are, please note that the theme is not yet ready for Gutenberg.

    You can subscribe to my social network channels where you’ll be informed about Gutenberg compatible theme update rather soon.

    But if you really need to fix this now, go ahead and edit the library/includes/classes/class-visual-editor.php file on line 405 from if ( ! isset( $post ) ) { to if ( ! isset( $post ) || ! isset( $init['body_class'] ) ) {. That should help.

    Best regards,

    Oliver Juhas
    WebMan Design

    #19474

    zoehex
    Participant

    Thank you very much for your quick reply. Effectively, I tried new Gutenberg editor. I will subscribe and wait with pleasure the theme update :)

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.