• Resolved cleciomayrink

    (@cleciomayrink)


    Everything working ok, but, it generates a big log with more than 50.000 lines with this message below:

    [29-Sep-2024 03:11:29 UTC] PHP Warning: Attempt to read property “ID” on null in /home4/scubad12/mergulho.com/wp-content/plugins/adrotate/adrotate-output.php on line 378

    Does anyone have any idea what might be happening?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Arnan de Gans

    (@adegans)

    Which version of AdRotate Banner Manager do you have installed now?
    You can see the version in your Plugins dashboard page.

    Thread Starter cleciomayrink

    (@cleciomayrink)

    Hi Arnan, is the last…. 5.13.5

    Plugin Author Arnan de Gans

    (@adegans)

    I did some tests, the ID value is always present in posts and pages as far as I can tell.

    The function this is in is for post injection and the line specifically is for posts (blog posts).

    Can you try to spot when the warning appears? For example if you browse to a certain page or post, and then what page it is and what post type.

    Thread Starter cleciomayrink

    (@cleciomayrink)

    Hi Arnan, I did several tests and discovered that when enabling statistics, the error.log file is created and every time pages are loaded, a line is inserted reporting the same error.

    /error.log

    Plugin Author Arnan de Gans

    (@adegans)

    Hmm, I’ll look into that.

    Thread Starter cleciomayrink

    (@cleciomayrink)

    Thank you so much !

    Plugin Author Arnan de Gans

    (@adegans)

    Can you check with the current version of AdRotate Banner Manager if the warning still pops up, and which line it’s at? 378 is no longer accurate I think.

    It’s probably 379 now.

    Plugin Author Arnan de Gans

    (@adegans)

    I can’t reproduce the warning anywhere, with or without stats.

    What kind of post are you loading that triggers it?
    Is it some kind of custom post type? A blog post? Page? Or…

    Thread Starter cleciomayrink

    (@cleciomayrink)

    It’s a sports website and I use the TagDiv theme.

    The ad is being inserted using a Widget.

    https://www.brasilmergulho.com

    You can see the ad in the bottom right corner, and every 10 seconds, a new ad loads.

    Plugin Author Arnan de Gans

    (@adegans)

    But the error is relevant for the Post Injection feature, not for widgets.
    Widgets use different code/functions to load ads.

    On the page you’re testing on, are there ads between or near paragraphs that are placed with Post Injection?
    If not, then please re-check the exact error and let me know.

    Thread Starter cleciomayrink

    (@cleciomayrink)

    Posts are added via Widget and are not between paragraphs.

    https://app.screencast.com/xlEjyFG78zyo4

    Plugin Author Arnan de Gans

    (@adegans)

    Yea ok, I get that.
    But the error you mentioned, the issue on line 378, that code is used on Post Injection. Not for widgets.
    More specifically, it’s inside a bit of code that determines which articles in which categories the ad should show in using a ID variable.

    Widgets don’t do that in AdRotate Banner Manager – Hence my confusion ??
    Logically this means that something else, not the widget, causes the warning.

    Either way, I did a quick test with a widget in a sidebar and the warning doesn’t show up for me then either.

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