• Resolved burhi

    (@burhi)


    Hello,

    The theme I use works on my site installed in the main directory.

    The site wordpress installed in the subfolder is working incorrectly. Missing Sidebar, Comments template and Footer

    site.com OK
    site.com/subfolder/ INCORRECT

    Reinstalling WordPress, changing themes, disabling plugins, etc. None of them worked.

    The source of the problem is the code in single.php;

    <?php comments_template( '', true ); ?>

    Fatal error: Uncaught DivisionByZeroError: Division by zero in /.../wp-includes/comment-template.php:1532
    Stack trace:
    #0 /.../wp-content/themes/derli/single.php(42): comments_template()
    #1 /.../wp-includes/template-loader.php(106): include('/home/p...')
    #2 /.../wp-blog-header.php(19): require_once('/home/p...')
    #3 /.../index.php(17): require('/home/p...')
    #4 {main} thrown in /.../wp-includes/comment-template.php on line 1532

    I have tried many themes but they all have the same problem in subfolders.

    When I did a Google search I saw that many sites were affected “wp-includes/comment-template.php on line 1532”

    https://ytter.no/2015/03/departure-absence-flight-emigration/

    https://www.saucycooks.com/who-needs-hot-food-displays/

    https://ilcontevini.it/en/company-numbers-2/

    https://schule-waldershof.de/services/zusammen_in_der_schule/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator threadi

    (@threadi)

    Your debug log already shows that the calling component is the “derli” theme you are using. Unfortunately, I have not been able to find this anywhere. I would recommend that you contact their support, as their template apparently passes incorrect data to WordPress components.

    There is already a ticket with the core developers for the resulting message here: https://core.trac.wordpress.org/ticket/61468 – but the actual cause is to be found in the theme.

    Thread Starter burhi

    (@burhi)

    Hello, It gives the same error in all themes. Except for the new generation design (twentytwentyxxx etc.)

    Moderator threadi

    (@threadi)

    Then it could also be a content error regarding data in your database, which is probably read out by the classic themes and simply passed on. For such a case, there is the above-mentioned ticket with the core developers, who would have to look at this with a concrete example.

    If there is a problem, one option might be to clean up the database, e.g. with https://wordpress.org/plugins/wp-optimize/ – this may find the problematic data record and can remove or optimize it (even if unconsciously). Before using this option, I would definitely recommend that you create a backup.

    If you still can’t find a solution, you can also look for someone who can take a look at your project with you. You can find someone like this here, for example: https://jobs.wordpress.net/

    Thread Starter burhi

    (@burhi)

    I changed the Discussion Settings. “Top level comments per page” was set to 0, I changed it to 10

    Problem solved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP 8.x Missing Sidebar, Comments template and Footer’ is closed to new replies.