• Resolved Pixelbart

    (@pixelbart)


    Hello,

    I hope this message finds you well. I am encountering a PHP Fatal Error within the AdvancedAds plugin on my website, and I’d like to report it for assistance in resolving the issue.

    Here are the details of our setup:

    • WordPress Version: 6.4
    • Advanced Ads Version: 1.47.3
    • Advanced Ads Pro Version: 2.24.2

    The error was discovered yesterday and appears to be occurring only in posts where we use the automatic ad insertion feature. We utilize the placement with the jQuery selector .post-content p:eq(1) for this purpose. This specific placement is necessary because the automatic placement using 2 paragraphs does not work correctly within the Elementor page builder, for reasons unknown to us.

    Here’s the error message along with the relevant stack trace (with anonymized paths):

    [08-Nov-2023 10:08:07 UTC] PHP Fatal error:  Uncaught TypeError: Illegal offset type in isset or empty in /wp-includes/media.php:5771
    Stack trace:
    #0 /wp-includes/media.php(1961): wp_get_loading_optimization_attributes('img', Array, Array)
    #1 /wp-content/plugins/advanced-ads/classes/ad_type_abstract.php(174): wp_img_tag_add_loading_optimization_attrs('<img src="https...', Array)
    ...

    The temporary solution I implemented was to remove lines 172 to 175 in the file /wp-content/plugins/advanced-ads/classes/ad_type_abstract.php. While this resolved the issue for now, I would appreciate your guidance on whether there is a more official fix or if this will be addressed in future updates.

    Thank you for your prompt assistance in resolving this issue. If you need any further information from me, please let me know.

    Greetings Kevin

Viewing 5 replies - 1 through 5 (of 5 total)
  • providerpt

    (@providerpt)

    Hello! We are experiencing the same issue. Same version and specs as @pixelbart. Same temporary fix in place. Thanks!

    • This reply was modified 1 year ago by providerpt.
    HansVanEijsden

    (@hansvaneijsden)

    Thank you for this temporary fix and the writeup. Here it also seems to be working again.

    HansVanEijsden

    (@hansvaneijsden)

    Update: for me it seems to be solved in version 1.47.4.

    Plugin Support Henning

    (@henningaa)

    Hi there,

    Yes, the issue was addressed with the update 1.47.4. Advanced Ads should work again with WP version 6.4.

    If you have further questions regarding Advanced Ads, please don’t hesitate to reach out to me again.

    Best regards,
    Henning

    Thread Starter Pixelbart

    (@pixelbart)

    True, is working now. Thank you for the fast update!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Fatal Error wp_get_loading_optimization_attributes’ is closed to new replies.