• Resolved ighulme

    (@ighulme)


    Hi, I’ve been using this brilliant plugin for years now, and it has always worked well.

    Unfortunately, I have suddenly begun to get a critical error on the pages with content visibility rules.

    The rest of the site is working fine (ighulme.com) but any page with content rules is broken (example).

    If I disable the plugin, the page works fine, and I have tried testing things by removing all other plugins, but I still get the same critical error.

    I am using the Divi theme (Version: 4.27.1) on WordPress version 6.61

    Any help you could offer would be much appreciated!

    Many thanks,
    Ian

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ighulme

    (@ighulme)

    I have done some further investigation, and I tried restoring backups of the site from 30 days ago and the problem still persists. I’m almost certain that the problem wasn’t there during that time, so I’m wondering if something else has changed recently other than plugins or themes, such as a PHP (8.2.22) or WordPress (6.61) update.

    Many thanks,
    Ian

    Plugin Author Jonathan Horowitz

    (@jhorowitz)

    Hi @ighulme,

    Thanks for using our plugin and for reaching out to us!

    I am not aware of any issues with the plugin on WordPress 6.6.1; it is working fine for me on a site I manage with that WordPress version.

    Could you please share one of the critical error stack traces here or to my email ([email protected])? I am thinking the PHP version may be the culprit, and you have previously deprecated code in the visibility setting that now throws errors with the newer PHP.

    Thanks!

    – Jon

    Thread Starter ighulme

    (@ighulme)

    Hi @jhorowitz ,

    Thanks so much for your reply. I’ve sent you an email with some error logs now.

    Many thanks!
    Ian

    Thread Starter ighulme

    (@ighulme)

    For anyone searching the support forums, Jon, the plugin developer got back to me really quickly and helped me solve the problem. ??

    I use the plugin alongside S2Member to make membership rules. The problem was in the custom capabilities such as:

    current_user_can(access_s2member_ccap_example)

    Adding single quotes has fixed the issue:

    current_user_can(‘access_s2member_ccap_example’)

    Many thanks Jon for all your help! ??

    Ian

    Plugin Author Jonathan Horowitz

    (@jhorowitz)

    Closing the loop here; with some additional logs this was determined to be a syntax error with PHP 8+ in the existing visibility expressions. A minor tweak to the code in the visibility expressions (albeit in many different places) set things straight again.

    • This reply was modified 2 months, 3 weeks ago by Jonathan Horowitz. Reason: Clarify the expressions needed tweaking, not plugin code
    Plugin Author Jonathan Horowitz

    (@jhorowitz)

    Hah, we were writing the follow up at the same time @ighulme ??

    Thanks for providing those additional details and glad everything is sorted ??

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