Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Plugin disable/enable not working after upgrade

I recently successfully updated to 2.1.6 from 2.0.18.2. However within my Dashboard, I cannot disable or enable plugins; I click the button, no error messages, but the screen refreshes and no change to the plugin's status.

Perhaps related, it seems that the EMailSubscribe plugin is not working to send email notifications.

I'm on an IIS server, if that matters.

Any tips on things to check/how to resolve would be greatly appreciated.

«1

Comments

  • Funny, I completely forgot that I had the same problem in the past:

    http://vanillaforums.org/discussion/18107/cant-enable-plugins

    As I mentioned in that thread, I see all the .tmp files in the /conf folder.

    The fix (related to IIS) that worked at that time was here - adding some lines to library/core/class.configuration.php:

    http://vanillaforums.org/discussion/17650/vanilla-fails-to-install-on-php5.2.17-windows7-apache2.2

    So as I look at the current class.configuration.php file in 2.1.6, it's a bit different - assuming the fix is similar, could someone guide me to the exact bit of code and insertion point in that file to address this?

  • peregrineperegrine MVP
    edited December 2014

    here is a test if you want to follow the directions carefully, and tell me the results.

    it is not intended to fix your problem, it is intended to determine what the issue is and based on your results and determine how to fix problem.

    put this file in the folder where vanilla is installed.

    if vanilla is installed in the vanilla folder.

    e.g. /vanilla/conftester.php

    <?php
    define('PATH_ROOT', getcwd());
    if (!defined('PATH_CONF')) define('PATH_CONF', PATH_ROOT.'/conf');
    $TmpFile = tempnam(PATH_CONF, 'mytest');
    
    $File = PATH_CONF.'/mytest.php';
    $FileContents = "Hello, World";
    
    $Result = FALSE;
    if (file_put_contents($TmpFile, $FileContents) !== FALSE) {
     $ChmodResult = chmod($TmpFile, 0775);
     var_dump($ChmodResult);
    $Result = rename($TmpFile, $File);
    var_dump($Result);
    } else {
    echo "file_put_contents failed </br>";
    }
    echo "Finished";
    die();
    

    then go your browner and run it.

    e.g.

    http://myexample.com/conftester.php

    • then report your results.

    and list all the file that begin with "mytest" that are in the /conf folder after you run it.

    also tell me the size of the mytest files.

    • if it runs correctly you will see these results on your browser screen.

    bool(true) bool(true) Finished

    and you will see in the conf folder....

    mytest.php

    with the contents "Hello World" inside.".


    if it fails - you will see

    file_put_contents failed
    Finished

    or something like
    bool(false) bool(false) Finished

    if you see files like this in conf folder (i.e. mytest with random characters after it).

    mytestMCfSKG

    and you don't see
    mytest.php

    then report what

    the size of mytest.... is
    the permissions
    and the owners.

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

  • @dnigrin

    see above read a few times and post results.

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

  • Thanks very much peregrine. Here's my results:

    bool(true) bool(true) Finished

    /conf/mytest.php is there, and it is 12 bytes. Contents are "Hello, World"

    Let me know next steps...

  • peregrineperegrine MVP
    edited December 2014

    try changing line 7 in conftester.php

    $FileContents = "Here we are";

    don't delete the existing /conf/mytest.php

    then run the conftester in your browser again and report back your results.

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

  • bool(true)
    Warning: rename(E:\HostingSpaces\XXXXXXX\XXXXXXX.com\wwwroot\forum\conf\myt6F83.tmp,E:\HostingSpaces\XXXXXXX\XXXXXXX.com\wwwroot\forum/conf/mytest.php) [function.rename]: File exists in E:\HostingSpaces\XXXXXXX\XXXXXXX.com\wwwroot\forum\conftester.php on line 11
    bool(false) Finished

    The XXXXXXX\XXXXXXX are details about my web site that I'd prefer not to post.

  • and do you have two mytemp files.

    one mytemp.php and a mytemp with random characters.

    and the mytemp with random characters has "Here we are" in it.

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

  • Exactly.

  • peregrineperegrine MVP
    edited December 2014

    make a copy of your config.php and save it to your local pc. Just in case.

    you do have a config.php correct?

    then try this change.

    https://github.com/vanilla/vanilla/blob/2.1/library/core/class.configuration.php#L1199

    replace lines 1199 thru 1204

     $TmpFile = tempnam(PATH_CONF, 'config');
     $Result = FALSE;
     if (file_put_contents($TmpFile, $FileContents) !== FALSE) {
        chmod($TmpFile, 0775);
        if (!rename($TmpFile, $this->Source)) {
             if (copy($TmpFile, $this->Source)) {
               unlink($TmpFile);
               $Result = TRUE;
               }
        } else {
        $Result = TRUE;
        }
      }
    

    then see if you can enable plugins.

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

  • peregrineperegrine MVP
    edited December 2014

    @dnigrin‌

    I made some typos see above for edited changes.

    you appear to have gone AWOL. >:)

    always fun when someone disappears in the middle of trying to help them :'(

    over and out!!!!!!!!!!!!!!!!!

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

  • peregrineperegrine MVP
    edited December 2014

    @dnigrin said:
    Sorry peregrine - I waited for about 15 min, and hadn't heard back, so yeah, I had to go to bed, early day for me today.

    The good news is that your code above seems to have done the trick!

    Thanks very much for your help!!

    14 minutes :)

    but who's counting. glad it worked.

    @R_J said: Maybe he just went to bed without saying good night

    maybe we need a new tip, if you are working with someone trying to help you, let them know you have to sign off, so they don't hang around wondering what happened to you.

    And yes I saw he logged out. didn't know for how long or why.

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

  • peregrineperegrine MVP
    edited December 2014

    @R_J said: although he finds that discussion interesting enough to bookmark it

    never noticed you could see other people's bookmarks though. now that was insightful and you deserve an insightful r_j , so I'm gonna click insightful right now!

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

  • R_JR_J Ex-Fanboy Munich Admin

    I've already filed that on GitHub and @Bleistivt did that, too. I guess it is no coincidence: it must be German paranoia ;)

  • peregrineperegrine MVP
    edited December 2014

    @R_J said:
    I've already filed that on GitHub and Bleistivt did that, too. I guess it is no coincidence: it must be German paranoia ;)

    und zee issue number ist? ____________

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

  • @peregrine said:
    maybe we need a new tip, if you are working with someone trying to help you, let them know you have to sign off, so they don't hang around wondering what happened to you.

    Duly noted, sorry about that again.

  • peregrineperegrine MVP
    edited December 2014

    @dnigrin said: Duly noted, sorry about that again.

    no problem. You are fully absolved o:)

    At least you tried things, attempted change, responded that solution worked, and said thank you, in less than approx 9 hours.

    some people just drop off the face of the earth never to return again, or say something worked, or to say thank you. or what the solution was.

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

  • peregrineperegrine MVP
    edited December 2014

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

Sign In or Register to comment.