Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Failed to enable the plugin

This discussion is related to the Advertisements addon.

This error appears when I try to enable the plugin:

Argument 1 passed to AdvertisementsPlugin_Repository::__construct() must be an instance of callable, instance of Closure given, called in /home/mysite/public_html/plugins/Advertisements/class.advertisements.plugin.php on line 46 and defined

Comments

  • Solved with last update (0.0.5)

    hgtonight
  • rotaechorotaecho Los Angeles New
    edited December 2014

    I am also unable to get the plugin to activate (0.0.5). It is not visible under the Plugins listing. I'm using VF 2.1.5 with BitterSweet Theme. I have it in the plugins directory proper owner & permissions, but nothing comes up on the dashboard to manage or configure advertisements. I'm very interested in this plugin! Hope we can figure it out (=

  • peregrineperegrine MVP
    edited December 2014

    @rotaecho said:
    I am also unable to get the plugin to activate (0.0.5). It is not visible under the Plugins listing. I'm using VF 2.1.5 with BitterSweet Theme. I have it in the plugins directory proper owner & permissions, but nothing comes up on the dashboard to manage or configure advertisements. I'm very interested in this plugin! Hope we can figure it out (=

    you may not be able to do things properly, until you resolve your other server issues. and you will continue to have problems with just about everything, until you solve them.

    http://vanillaforums.org/discussion/comment/221262/#Comment_221262

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • rotaechorotaecho Los Angeles New

    Okay, same issue with apache & nginx and now my other issues have been resolved. I also was able to upgrade to 2.1.6.

    When I enable the plugin, I see the menu on the left "Forum - Advertisements" but I see the following:

    Is there any known plugins that fail with this plugin?

    My list is:

    // EnabledPlugins
    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    $Configuration['EnabledPlugins']['Facebook'] = TRUE;
    $Configuration['EnabledPlugins']['AllViewed'] = TRUE;
    $Configuration['EnabledPlugins']['ButtonBar'] = TRUE;
    $Configuration['EnabledPlugins']['Buttons'] = TRUE;
    $Configuration['EnabledPlugins']['Emotify'] = TRUE;
    $Configuration['EnabledPlugins']['Flagging'] = TRUE;
    $Configuration['EnabledPlugins']['Gravatar'] = TRUE;
    $Configuration['EnabledPlugins']['VanillaInThisDiscussion'] = TRUE;
    $Configuration['EnabledPlugins']['ProfileExtender'] = TRUE;
    $Configuration['EnabledPlugins']['SplitMerge'] = TRUE;
    $Configuration['EnabledPlugins']['Sprites'] = TRUE;
    $Configuration['EnabledPlugins']['Tagging'] = TRUE;
    $Configuration['EnabledPlugins']['VanillaStats'] = TRUE;
    $Configuration['EnabledPlugins']['WhosOnline'] = TRUE;
    $Configuration['EnabledPlugins']['Quotes'] = TRUE;
    $Configuration['EnabledPlugins']['Voting'] = TRUE;
    $Configuration['EnabledPlugins']['FileUpload'] = TRUE;
    $Configuration['EnabledPlugins']['Signatures'] = TRUE;
    $Configuration['EnabledPlugins']['QnA'] = TRUE;
    $Configuration['EnabledPlugins']['PrivateCommunity'] = TRUE;
    $Configuration['EnabledPlugins']['ReplyTo'] = TRUE;
    $Configuration['EnabledPlugins']['ShareThis'] = TRUE;
    $Configuration['EnabledPlugins']['StopForumSpam'] = TRUE;
    $Configuration['EnabledPlugins']['IndexPhotos'] = TRUE;
    $Configuration['EnabledPlugins']['Sitemaps'] = TRUE;
    $Configuration['EnabledPlugins']['Liked'] = TRUE;
    $Configuration['EnabledPlugins']['OpenID'] = TRUE;
    $Configuration['EnabledPlugins']['GoogleSignIn'] = TRUE;
    $Configuration['EnabledPlugins']['cleditor'] = TRUE;
    $Configuration['EnabledPlugins']['AdvancedGoogleAnalytics'] = TRUE;
    $Configuration['EnabledPlugins']['VanillaSEO'] = TRUE;
    $Configuration['EnabledPlugins']['Advertisements'] = TRUE;
    

    Thanks!

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    The proper way to troubleshoot plugins is to turn them off one by one until you find the one that causes problems. Please make sure all of your plugins are updated or work with 2.1.

  • rotaechorotaecho Los Angeles New
    edited December 2014

    @vrijvlin okay, I disabled all the plugins except the login and profile extender. Same behavior.

    // EnabledPlugins
    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    $Configuration['EnabledPlugins']['Facebook'] = TRUE;
    $Configuration['EnabledPlugins']['ProfileExtender'] = TRUE;
    $Configuration['EnabledPlugins']['OpenID'] = TRUE;
    $Configuration['EnabledPlugins']['GoogleSignIn'] = TRUE;
    $Configuration['EnabledPlugins']['Advertisements'] = TRUE;
    

    Thanks for any advice.

  • vrijvlindervrijvlinder Papillon-Sauvage MVP

    Very strange indeed... I will try to get that to work see if I can...

  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    Looks like there is something - could you check if it is a "only" a styling problem by looking at the html? Maybe all the content is there but the CSS is corrupt


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    By the way: in the readme, the author says you have to create a GitHub issue to get support of him, because he will not track this forum.


  • R_JR_J Cheerleader & Troubleshooter Munich Moderator

    I've just unzipped the file to my server and the file access rights were the reason why I didn't saw the file in the plugin list.
    I've written a small script before to get the rights set up "correctly", maybe some others find it useful. It has to be saved in the Vanilla root folder

    find ./ -type d -exec chmod 755 {} +
    find ./ -type f -exec chmod 644 {} +
    chmod -R 775 cache/
    chmod -R 775 uploads
    chmod 775 conf/config.php
    chown -R root:root ./
    chown -R www-data:www-data cache/
    chown -R www-data:www-data uploads/
    chown www-data:www-data conf/
    chown www-data:www-data conf/config.php
    

    Forget my CSS question! Looking at the php source code of the view and at your screenshot makes me think you have a problem with phps short tags.

    Try creating a test.php with following content to prove that: This output will <?= 'not' ?> fail

    Or simply add short_open_tag=On to your php.ini, restart php5-fpm and try again accessing the advertisment screen


    Bleistivthgtonight
  • edited December 2014

    Short open tags are only required for PHP 5.3 and below. If you are using PHP 5.3 or below.. well.. scary. [:

    And no, I don't monitor the forums often. If you're still having trouble with the plugin please open an issue and I can help debug it!

    hgtonight
Sign In or Register to comment.