Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Allowing Guests to view Discussions in 0.9.2

Hi everyone, I'm using vanilla to launch an upcoming online magazine but it's giving a couple of issues. One is that I can't set threads to sticky or closed, it says it does it but nothing happens, so I'm forced to go into the database and do it. Not a huge deal, just a minor inconvenience. Also non-members/guests are not allowed to view any discussions. I set "allow non-members to browse forums" but it didn't do anything. The only thing I can do is allow banned members to participate in forums, which is something I really don't want to do. Also just realized that my saved forum preferences for my user account say they're saved, but they're not. Something I really don't feel like diving into the database to handle. Is there a way around this or should I just wait for the 0.9.3 release and see if that remedies things? I'm assuming it'd be better to wait for the next release and just install fresh, does anyone have an estimate on how long that'll be?
«1

Comments

  • Options
    edited January 2006
    Are you sure your database user has all necessary permissions for all of the vanilla tables?

    It probably would throw a big error if there was a major missing priv, but it might silently fail in certain rare cases.
  • Options
    MarkMark Vanilla Staff
    edited January 2006
    So strange that these wacky bugs creep up in 0.9.2.x when it's been out without complaints for so long. Upgrading to 0.9.3 right now would be kind of a pain since it's not ready for public release yet. I'm sure these issues could be debugged pretty easily, though. Most of the things you're having problems with relate to the ajax code. You can isolate the javascript function being called when those preferences are set, and then change it to redirect to the ajax page rather than xmlhttprequest it. That way if there are any errors happening, you'll be directed to the ajax page to see it happen.
  • Options
    How would I go about directing to the ajax page instead? Sorry for the lame questions, but I'm still not even remotely up to par with this whole AJAX Web.20 thang.
  • Options
    MarkMark Vanilla Staff
    edited January 2006
    In your /js/vanilla.js file there is a PanelSwitch function:

    function PanelSwitch(PanelItem, RefreshPageWhenComplete) { var chkBox = document.getElementById(PanelItem+"ID"); if (chkBox) { ChangeLoaderText("Processing..."); SwitchLoader(1); var dm = new DataManager(); if (RefreshPageWhenComplete == 1) { dm.RequestCompleteEvent = RefreshPage; dm.RequestFailedEvent = RefreshPage; } else { dm.RequestCompleteEvent = HandleSwitch; dm.RequestFailedEvent = HandleFailure; } dm.LoadData("./tools/switch.php?Type="+PanelItem+"&Switch="+chkBox.checked); // Debug: document.location = "./tools/switch.php?Type="+PanelItem+"&Switch="+chkBox.checked; } }

    As you can see, all you need to do is comment out the dm.LoadData line and uncomment the // Debug line, so the end of the function will look like this:

    // dm.LoadData("./tools/switch.php?Type="+PanelItem+"&Switch="+chkBox.checked); document.location = "./tools/switch.php?Type="+PanelItem+"&Switch="+chkBox.checked;

    Then, on the account > Preferences form, it if you check or uncheck one of the preferences that was giving you trouble, it will send you to the ajax page that handles that request so you can see if you get any errors.
  • Options
    I edited the file as you instructed, but checking the box still did the exact same thing. Said "complete" on the little box at the top and nothing happened. Since you're releasing a new version anyway it's not a huge issue if this is resolved or not, so don't worry about it :)
  • Options
    MarkMark Vanilla Staff
    Which box did you check?
  • Options
    Something about what to display in the User section.
  • Options
    MarkMark Vanilla Staff
    the "Display list appendices in the control panel" box should call that PanelSwitch function. If it doesn't redirect, then you might have to hard-refresh your page so that the browser pulls in the latest version of that js file.
  • Options
    MarkMark Vanilla Staff
    Oh, and you can hard refresh your browser in windows by either doing a CTRL+F5 or SHIFT+F5 (I can never remember which it is, so I do both).
  • Options
    Ah, there it is.

    I got a nice little chunk of hate
    Warning: main(../vanilla/appg/headers.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(../vanilla/appg/headers.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(): Failed opening '../vanilla/appg/headers.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(../vanilla//library/Utility.Functions.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14 Warning: main(../vanilla//library/Utility.Functions.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14 Warning: main(): Failed opening '../vanilla//library/Utility.Functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14 Warning: main(../vanilla//library/Utility.Database.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 15 Warning: main(../vanilla//library/Utility.Database.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 15 Warning: main(): Failed opening '../vanilla//library/Utility.Database.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 15 Warning: main(../vanilla//library/Utility.SqlBuilder.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 16 Warning: main(../vanilla//library/Utility.SqlBuilder.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 16 Warning: main(): Failed opening '../vanilla//library/Utility.SqlBuilder.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 16 Warning: main(../vanilla//library/Utility.MessageCollector.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 17 Warning: main(../vanilla//library/Utility.MessageCollector.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 17 Warning: main(): Failed opening '../vanilla//library/Utility.MessageCollector.class.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 17 Warning: main(../vanilla//library/Utility.ErrorManager.class.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 18

    That's like 1/3 of it.
  • Options
    edited January 2006
    I'm *guessing* that extra slash after "vanilla" in your path is killing it.

    Note: I've been wrong many times before, including above.
  • Options
    I actually wonder where that extra slash comes from, as my declared webpath doesn't have a trailing slash.
  • Options
    That is strange.

    Do any of your other settings have "vanilla" with a slash?
  • Options
    I remember when I was setting up the forums initially I had some issues with double slashes like that but eventually I (though I) resolved them. I'm hunting around right now for that slash, but not really finding anything.
  • Options
    edited January 2006
    Hmm, lines 13, 14, and 15 of ajax_init.php all use different path variables.
  • Options
    edited January 2006
    edit: nevermind I figured out the double slash issue. Now I'm left with a lot of errors not featuring double slashes such as...
    Warning: main(../vanilla/appg/headers.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(../vanilla/appg/headers.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(): Failed opening '../vanilla/appg/headers.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 13 Warning: main(../vanilla/library/Utility.Functions.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14 Warning: main(../vanilla/library/Utility.Functions.php): failed to open stream: No such file or directory in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14 Warning: main(): Failed opening '../vanilla/library/Utility.Functions.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/xxviiine/public_html/vanilla/appg/init_ajax.php on line 14
  • Options
    edited January 2006
    Well, is appg/headers.php there?

    Proper privs?
  • Options
    Yep, but apparently it doesn't want to play nicely at all.
  • Options
    edited January 2006
    Ah okay I got everything fixed, I had to use a weird server-y kind of path.

    Thanks all for the help :)
  • Options
    MarkMark Vanilla Staff
    Excellent!

    (and, of course, you'll need to switch your javascript back to the original way)
This discussion has been closed.