• Resolved baffled

    (@baffled)


    Hello, I’m getting an intermittent PHP warning since I updated from 7.4:

    Attempt to read property “ID” on null in /wp-content/plugins/ultimate-faqs/views/View.FAQs.class.php on line 521

    Is there something we can do to address this or is it a matter of waiting for a plugin update? Many thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi baffled,

    Do you mean PHP 7.4? If so, what version of PHP are you using now?

    Where is that warning happening (e.g. which page on the front end or back end), and what action causes it?

    Thread Starter baffled

    (@baffled)

    Yes, apologies – PHP 7.4 to 8.2. I can’t tell what action causes it as it seems to be intermittent, so I’ll keep an eye on it and update if I can narrow it down.

    Plugin Support jaysupport

    (@jaysupport)

    Thank you! One thing I’ll say is that WordPress itself isn’t yet fully compatible with PHP 8.2 (only beta support), so you may want to downgrade until it is.

    Source: https://make.www.ads-software.com/core/handbook/references/php-compatibility-and-wordpress-versions/

    Thread Starter baffled

    (@baffled)

    Thank you and apologies for the delay in response. Our host only supports PHP 7.4 or 8.2 and our payment processor is blocking sites still using 7.4 in its next update, so unfortunately our hand has been forced. This isn’t a big deal as it doesn’t seem to have any ill effects; I just wanted to report the warning.

    I’ve figured out how to trigger it but can’t work out why it’s happening. If a site visitor goes to:

    /faqs/single-faq/FAQSLUGNAME/faq-category/FAQCATEGORYNAME/

    Where FAQSLUGNAME is a valid UFAQ slug and FAQCATEGORYNAME is its valid category, the error appears in the log multiple times. The displayed content is just our existing /faqs/ page (which is a curated Page full of 14x UFAQ category shortcodes which doesn’t trigger any error when visited normally via /faqs/). Significantly, the PHP warning appears 14x in the log at this moment, implying that it’s visiting /faqs/ via the /faqs/single-faq/FAQSLUGNAME/faq-category/FAQCATEGORYNAME/ referrer which is causing the problem.

    What I haven’t worked out is why anyone would ever visit an address in that format in the first place. Our FAQs are all organized with pretty permalinks under /ufaq/FAQSLUGNAME so /faqs/ shouldn’t be happening. Is this because we have pretty permalinks enabled? The link doesn’t exist anywhere in our site db content so I’m trying to work out where it’s being generated to allow people to reach it. If I can find a way of disabling this behavior then nothing needs fixing.

    Plugin Support jaysupport

    (@jaysupport)

    That chain in the URL would imply that someone is visiting the page for a single FAQ and then clicking on a category link within that FAQ.

    You are correct that the URLs you referenced our related to the pretty permalinks option being enabled. This is a premium option, discussion of which is not allowed in these forums (https://www.ads-software.com/support/guidelines/#do-not-post-about-commercial-products). With that in mind, I’ll have to ask that you please write to us via email or our support center (https://www.etoilewebdesign.com/support-center/), so we can continue the discussion about this there.

    Thanks

    Thread Starter baffled

    (@baffled)

    Thank you, understood!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP warning with View.FAQs.class.php’ is closed to new replies.