• Hi,

    I am encountering a reproducible HTTP 500 fatal error on my site’s front-end posts when logged in as an admin.

    Here are the details:

    • Environment: WordPress 7.1.2, latest WP Recipe Maker, and LiteSpeed Cache active on a LiteSpeed server.
    • Issue: Loading any front-end post while logged in with “Show Toolbar when viewing site” enabled triggers an HTTP 500 error.
    • Diagnostic Findings:
    1. Turning off “Show Toolbar when viewing site” immediately resolves the 500 error.
    2. Disabling LiteSpeed Cache allows the site and admin toolbar to load normally.
    3. Disabling WP Recipe Maker while keeping LiteSpeed Cache active also allows the site and admin toolbar to load normally.
    4. With WP Debugging enabled, a notice is thrown: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-recipe-maker domain was triggered too early...

    It appears WP Recipe Maker’s early textdomain/translation hook during toolbar initialization collides with LiteSpeed Cache’s admin bar handling on the front end, leading to a fatal PHP execution crash.

    Could you please look into updating the hook sequence or translation loading timing so it doesn’t conflict with LiteSpeed Cache when rendering the front-end admin bar?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Brecht

    (@brechtvds)

    Hi there,

    As far as I’m aware, the text-domain loader itself is loaded correctly on our end, during the init hook. The translation message is a notice shouldn’t break anything on its own either.

    Could you check the PHP or server error log immediately after reproducing the 500 and share the fatal error or uncaught exception, including its file, line, and stack trace that appears?

    Could you also try disabling “Show Admin Bar Menu Item” on the WP Recipe Maker → Settings → Permissions page and see if that makes a difference?

    Kind regards,
    Brecht

    Thread Starter thunder_god

    (@thunder_god)

    Hi Brecht,

    I captured the exact log output from /wp-content/debug.log right after triggering the HTTP 500 error on one recipe post:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-recipe-maker domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. (This message was added in version 6.7.0.) in /wp-includes/functions.php on line 6260

    PHP Fatal error: preg_replace(): Cannot use output buffering in output buffering display handlers in /wp-content/plugins/litespeed-cache/src/optimize.cls.php on line 496

    PHP Fatal error: preg_replace(): Cannot use output buffering in output buffering display handlers in /wp-content/plugins/hide-my-wp/models/Rewrite.php on line 3240

    Also I tried disabling “Show Admin Bar Menu Item” on the WP Recipe Maker settings page however, I’m still getting the same error message or a blank screen on certain blog posts, some others seem to load fine though.

    Thank you!

    Plugin Author Brecht

    (@brechtvds)

    Thank you for the log and for testing the WPRM toolbar setting. The fatal errors are occurring in LiteSpeed Cache’s page optimizer and Hide My WP’s rewrite code. The WPRM translation notice is separate and does not explain those fatal errors.

    Could you test on a staging copy with Hide My WP disabled, keeping WPRM and LiteSpeed Cache active? Then test with LiteSpeed Cache Page Optimization disabled, keeping WPRM and Hide My WP active. Please let us know which combination still produces the 500, along with the exact PHP and plugin versions.

    If your host can provide the PHP stack trace for the first fatal error, that would help pinpoint the output-buffer conflict.

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

You must be logged in to reply to this topic.