Skip to:
Content
Pages
Categories
Search
Top
Bottom

Critical error when user tries to reply to a post

  • @janecarole

    Participant

    Wordpress version: 5.8.4
    Php 8.0.17
    https://lemonstograpes.com

    Using Twenty-Seventeen theme

    Issue: When a user tries to reply to a post, the user gets this error message:

    There has been a critical error on this website.
    Learn more about troubleshooting WordPress.

    I do not get this error when I post a reply (I am logged in as an administrator). However, if I log in using the users credentials and try to post a reply, I get the same message the user gets. Please help. I have no idea what to do about this.

    Thanks so much!

    Jane

Viewing 15 replies - 1 through 15 (of 15 total)
  • @robin-w

    Moderator

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    @janecarole

    Participant

    Done and I’m back.

    I put the results of the health check below. I have been waiting to upgrade to WP 5.9.3. (Problem avoidance syndrome). It doesn’t seem that the two deactivated plugins (that I plan to use in the future) should be causing my problem.

    (Also, I noted that a user is able to post blog comment without a problem.)

    Hoping you can help me.

    …….
    Results of Health Check:

    Site Health Status

    2 Recommended improvements
    WordPress update available (5.9.3) Performance
    A new version of WordPress is available.

    Install the latest version of WordPress

    You should remove inactive plugins Security
    Plugins extend your site’s functionality with things like contact forms, ecommerce and much more. That means they have deep access to your site, so it’s vital to keep them up to date.

    Your site has 2 inactive plugins. Inactive plugins are tempting targets for attackers. If you’re not going to use a plugin, we recommend you remove it.

    @robin-w

    Moderator

    so did you do this bit?

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    @janecarole

    Participant

    A little more explanation: My site is active so I don’t want to switch to a default theme because it makes the site go nuts. (My site uses twenty-seventeen.) I tried switching to twenty-twenty on my staging site, but that didn’t help because I couldn’t test the problem as a user since I have to stay logged in as myself in order to use my staging site.

    If I decide to test by changing themes on my live site and letting it go nuts, and if that were to solve the user posting problem, how would that help? I have to be able to use the twenty-seventeen theme. I have worked and worked with twenty-seventeen over a long time to get it exactly like I want it. Twenty-twenty or twenty-one will not work for me.

    @janecarole

    Participant

    Also, deactivating all plugins will mess up my live site too much. I could deactivate/reactivate one at a time, I suppose. That will be a daunting task. Can you suggest what plugins I might start with ?? Is there an easy way to send you a list of all my plugins?

    @janecarole

    Participant

    One more piece of information:

    This is what is on the browser line when I get the error message (a 404 page missing error):

    Esther’s Last Chapter after 17 years in the LC

    The post #8039 is the post to which the user is replying. The post is present so why would the user get a page missing error?

    @janecarole

    Participant

    One more thing I see–

    When I am logged in as a normal user and I put my cursor in the “reply to a post” box, this is what appears in the browser:

    “lemonstograpes.com/forums/topic/esthers-last-chapter-after-17-years-in-the-lc/?bbp_reply_to=8039&_wpnonce=60f250f83c#new-post”

    When I am logged in as myself (admin) and do the same thing, this is what appears in the browser:

    “lemonstograpes.com/forums/topic/esthers-last-chapter-after-17-years-in-the-lc/#post-8039”

    Is there a reason for the difference in the two? Remember that the first one results in the error. The second (admin logged in) succeeds in posting a reply.

    Sorry for all the posts … I see on my new topic post that I somehow managed to put all this under “Installation.” Sorry. That is not correct. My site has been up and running since 2017.

    @robin-w

    Moderator

    ok, given all the above, let’s try a different route.

    In essence we need to find out exactly what this critical error is, so we need to switch on the error debug, and get to the heart of this.

    The easiest way is to use

    WP Debugging

    You may see lots of errors appear immediately (you may not!), don’t worry most will be trivial ones, but you might want to do this at a quiet time on your site as everyone will then see these.

    So what we want is the exact error that you get when you try and post. Copy it, and you can then immediately switch debug back off.

    post that back here, and we should be able to progress

    @janecarole

    Participant

    Thank you so much. I will do this as soon as I can and post the result.

    @janecarole

    Participant

    Good Moday morning!

    I ran the debugging plugin and here is the result:


    Learn more about troubleshooting WordPress.

    @robin-w

    Moderator

    so the key data is

    Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home2/lemonst5/public_html/wp-content/plugins/moderation-tools-for-bbpress/incs/moderation.php:111

    so the plugin ‘moderation-tools-for-bbpress’ is causing the error, from memory the issue is with it running with php8.x.

    This plugin is closed and not being updated.

    However I have incorporated all that functionality into my style pack plugin, where this error should not occur.

    so deactivate the moderation-tools-for-bbpress and delete and then

    bbp style pack

    once activated go to

    dashboard>settings>bbp style pack>Moderation.

    @janecarole

    Participant

    That worked! So relieved. I hate bugs. Thank you!

    I already have bbp style pack so it looks like I am good to go. Glad to find out you have added the old plugin’s features to it.

    I’d like to make a contribution for your work. How would I do that?

    @robin-w

    Moderator

    ah thanks for your kind words

    Home

    @janecarole

    Participant

    Would you mind removing my debug information from my earlier post? Thanks.

    Another quick question: Can you recommend a replacement for bbpress WP Tweaks? It hasn’t been updated in several years and my security software advises me to remove it.

    I use it so I can have a unique sidebar for the bbpress forum (using twenty-seventeen).

    @robin-w

    Moderator

    that is a generic warning that bbpress throws up for all software that is not being maintained.

    tweaks continues to work fine.

    You could change it, but due to WordPress becoming obsessed with blocks, how to get it to work otherwise depends on may factors.

    you could try this

    Lightweight Sidebar Manager

    I’ve not used it

    bbpress has custom post types of ‘topic’, ‘reply’ and ‘forum’ – no idea if it will work

    If it doesn’t – come back

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