WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Advertising Manager] Fatal error: Call to... (39 posts)

  1. desandro
    Member
    Posted 5 years ago #

    When I try to use the widget, I get the following error:

    Fatal error: Call to a member function is_available() on a non-object in /home/xxx/public_html/wp-content/plugins/advertising-manager/advertising-manager.php on line 145

    I can't get it to work. Any help would be appreciated.

  2. switzer
    Member
    Posted 5 years ago #

    Desandro:

    Did you use Adsense Manager before this? The only way I can envision this error coming up is if there is old data from an earlier version of this plug-in.

    I am happy to walk through it with you if you wish. Skype me on 'switzer'.

    Cheers,
    Scott

  3. desandro
    Member
    Posted 5 years ago #

    Hello Scott

    No, I don't think so.
    But it runs the Author Advertising 1.5 Plugin.

    Is the problem perhaps the number of ad places? Is it like that, how I could repair this?

    Thanks for your help!

  4. switzer
    Member
    Posted 4 years ago #

    desandro:

    There should be no problems with the number of ad places, or conflicts with the Author Advertising plugin.

    The only thing I can think of is if you have more than 3 Google Adsense ads on a page, it does not show any more Google Adsense ads (per their T&C).

    It may be best to debug on Skype...

    Scott

  5. richlionheart
    Member
    Posted 4 years ago #

    I have this same error occuring. None of the widgets work, but leave this error in the admin and on the blog. Fresh install of latest version. Not calling any other ads but this one from the sidebar.

    Please advise?

    Thanks,
    Rich

  6. switzer
    Member
    Posted 4 years ago #

    richlionheart:

    If you could, please ping me the URL where you are having problems, so I can check it out. Also, it would be helpful if you ping me on Skype so we can solve this quickly.

    Many thanks,
    Scott

  7. switzer
    Member
    Posted 4 years ago #

    richlionheart:
    desandro:

    I rolled a new version - there were a few variables that were not namespaced correctly, and thus had the slight chance of interference with another plugin.

    Please try again with 3.3.11 and let me know the results.

    Many thanks,
    Scott

  8. desandro
    Member
    Posted 4 years ago #

    Hello Scott

    The new version dont work. Still the same error.

    But in the moment i dont have time for this. (Travel)

    PS: I dont have more than 3 Google ads on a page.

  9. switzer
    Member
    Posted 4 years ago #

    desandro:

    Please let me know when you have some time for this - I am quite keen to get this one solved.

    If anyone else gets the same error (e.g. Fatal error: Call to a member function is_available() on a non-object) please let me know!

    Cheers,
    Scott

  10. balbrecht
    Member
    Posted 4 years ago #

    switzer:

    same problem here:

    Fatal error: Call to a member function is_available() on a non-object in user folder/wp-content/plugins/advertising-manager/advertising-manager.php on line 146

    which is:
    if ($ad->is_available()) {
    echo $before_widget;

    on

    http://www.perceptions-unlimited.com/blog

    I have to disable as it breaks my sidebar. I am willing to work on it if you contact me.

    Bruce

  11. switzer
    Member
    Posted 4 years ago #

    balbrecht:

    Would you mind letting me know the following:
    PHP Version
    Wordpress Version

    Also, can you ensure that this breaks when you have no other plugins installed? Or, please let me know which other plugins you have installed.

    I am on skype at switzer if you want to discuss further

  12. switzer
    Member
    Posted 4 years ago #

    This issue has now been fixed in v3.3.12.

    Thanks balbrecht!
    Scott

  13. balbrecht
    Member
    Posted 4 years ago #

    Confirming the fix by Scott...everything working fine now.
    Bruce

  14. vkfrainbow
    Member
    Posted 4 years ago #

    My error is a tad different, but this is what it says when I go to activate the plug-in:

    Fatal error: Call to undefined method stdClass::get() in /home/ivehadmy/public_html/wp-content/plugins/advertising-manager/class-upgrade.php on line 203

    I've uninstalled and reinstalled today. I've uninstalled AdSense Manager (just one ad running on WP 2.7.1), which worked well. Also running: Askimet, All in One SEO, Twitter tools, Config. Tag Cloud, Google XML Sitemaps.

    Site name is: ivehadmy.com

    Thanks,
    Val

  15. moeloe
    Member
    Posted 4 years ago #

    I installed Advertising Manager by searching for it in the plugin directory. Now I am having serious problems with it.

    First, after installing, I continued getting the system message that Adsense had been changed to Advertising Manager and that I should download and install that - even though I already had downloaded, installed, and activated it.

    Second, I was also getting a system message about optimization (can't quote it, as you'll find out in a minute), which was "recommended". I clicked yes, several times, but the message never went away.

    Finally, and most seriously...

    I tried to put in my Adsense information in the fields designated for a referrer ad. At first it seemed to work. But then I clicked on something (not sure what it said, but what I wanted to do was change the colors of the ad), and now I cannot access my WordPress Dashboard at all. When I try, all I get is a blank page with the following message:

    Fatal error: Call to undefined method Ad_AdSense_Referral::get() in /home/moeloe/maureenmower.com/wp-content/plugins/advertising-manager/advertising-manager.php on line 106

    This is why I can't quote the exact messages in the first two issues, I can no longer access my Dashboard at all.

    I'm hosting my own WP blog site - http://www.maureenmower.com So far, my site is working just fine (although I see no difference with the new plugin) - but I won't be able to add any new posts until I can back into the Dashboard. PLEASE HELP!!

  16. switzer
    Member
    Posted 4 years ago #

    vkfrainbow:
    moeloe:

    Thanks for the messages. I am looking into them now. I will post back when I find something.

    Cheers,
    Scott

  17. moeloe
    Member
    Posted 4 years ago #

    Thanks Scott - looking forward to a fix.

    I should mention this - I am technologically clueless when it comes to tweaking programs and such. Without the dashboard, I am lost. So please, when you post any information on how to deal with my problem, use plain english and step-by-step detailed instructions.

    Thanks!

  18. moeloe
    Member
    Posted 4 years ago #

    Damn!! Now my website isn't working either. Getting the same blank page and error message.

    This is now urgent!!

  19. moeloe
    Member
    Posted 4 years ago #

    Well, for now the problem was resolved by removing the plug in files from my database (thanks go to the Dreamhost support staff, as I wasn't sure how to do this properly. Both my website and the WP Dashboard are working again now.

    I'd still like to know what the problem was, and I won't re-install that plug-in until I know it's been fixed.

  20. switzer
    Member
    Posted 4 years ago #

    vkfrainbow: The reason that you received this error is that Adsense Manager and Advertising Manager are both enabled. Please disable Adsense Manager first, then Advertising Manager will run just fine.

    Cheers,
    Scott

  21. switzer
    Member
    Posted 4 years ago #

    moeloe:

    Can you try to disable the Adsense Manager plugin first before enabling Advertising Manager? I think that this will solve your issues. Let me know how it goes.

    Cheers,
    Scott

  22. ChemicalJump
    Member
    Posted 4 years ago #

    @switzer

    I disabled Adsense Manager before installing Advertising Manager (Version 3.3.13) just like you said but I get this error:

    Fatal error: Using $this when not in object context in /wp-content/plugins/advertising-manager/class-upgrade.php on line 209

  23. galbaras
    Member
    Posted 4 years ago #

    Scott,

    It's good that you're on this forum and helping.

    I think you'll have a lot less work if the instruction to disable the old plugin were in the installation instructions. I've had to figure that out myself.

    You may also want to document that the publisher ID is now not part of the "network" definition and needs to be updated into individual ads.

    Another thing is that the help text you link to from the FAQs tells people to put their ad code directly into their template. What about adsensem_ad()?

    Cheers,
    Gal

  24. switzer
    Member
    Posted 4 years ago #

    ChemicalJump:

    What version of WordPress are you using? Also, I just rolled out a version of Advertising Manager which does not enable until Adsense Manager is totally disabled (v3.3.14). Please test and let me know the results.

    Scott

  25. switzer
    Member
    Posted 4 years ago #

    galbaras:

    Thanks for your compliments :)

    For some reason, the wiki that had the documentation lost some pages, including upgrade instructions. I will find a backup and get them back - thanks for the feedback.

    Great to know about the Publisher ID. Is this a problem for you? The reasoning that I had is that if you store the Publisher ID, you can rotate different publisher ids so that you can share revenue with others (e.g. with other authors).

    adsensem_ad(name) works as it did before, as well as advman_ad(name). You can also add ads as a widget, without editing the template.

    Cheers,
    Scott

  26. ChemicalJump
    Member
    Posted 4 years ago #

    switzer

    Using the latest WordPress 2.7.1

    I've tried it every way I can think of and still getting that same error. It happens every single time I disable Adsense Manager. I can have the two enabled at the same time, but the second I disable Adsense Manager it screws up. I also tried deleting the Adsense Manager plugin folder but that didn't help.

  27. switzer
    Member
    Posted 4 years ago #

    ChemicalJump:

    I think that I see what your error is. I made a new version 3.3.15 which should fix it.

    Please let me know how you go.

    Cheers,
    Scott

  28. ChemicalJump
    Member
    Posted 4 years ago #

    It works! 3.3.15 did the trick! Thanks a lot!

  29. switzer
    Member
    Posted 4 years ago #

    ChemicalJump:

    Glad to hear it!

  30. galbaras
    Member
    Posted 4 years ago #

    Scotty my boy, you're one of the good guys.

    I've found the adsensem_ad function after stuffing my theme with the Google code. Will reconsider it if ever things change.

    I could see the ratinale behind the publisher ID switch, but it wasn't where I expected it, so I got spooked a bit...

    Doing this switchover made me create adsense ads, which I guess was a good idea anyway and now everything seems to be working great.

    Thanks again,
    Gal

Topic Closed

This topic has been closed to new replies.

About this Topic