• Resolved Slavek

    (@jackoneill)


    Hi, I’m getting the following error on Tutor LMS pages.

    Warning: Attempt to read property “content” on null in /data/8/0/80d2fd15-351d-4449-a6f9-14cce0a2778c/karolinanumminen.com/web/wp-includes/blocks/template-part.php on line 73

    Line 73 says: $content = $block_template->content;

    It’s also on lesson pages. It’s not on any other page so I assume it’s related to your plugin. The website uses Oxygen Builder 4.8.3, Tutor LMS 2.7.3, Oxygen Tutor LMS 2.0.3. PHP 8.1. WP_DEBUG_DISPLAY is set to false.

    Could you please help?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hello Slavek,

    Thank you for reaching out to us regarding the issue of receiving a warning about the content value being null.

    This warning appears to be related to your active theme. The code in question, located in the?template-part.php?file, is part of the active theme. If the theme provides the template part, it will retrieve the content value.

    You can modify line 73 of the code as follows:
    $content = isset($block_template->content) ? $block_template->content : ' ';

    If the warning persists after this modification, please try activating a default WordPress theme and check if the warning continues to appear.

    If you encounter any further issues, please let us know.

    If you are satisfied with the answer and your problem is solved, please mark the thread as “Resolved.” Thank you.

    Best regards,
    Sunjida Binta Al Beruni

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: Attempt to read property “content” on null’ is closed to new replies.