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

post after logout

edited September 2005 in Vanilla 1.0 Help
our install of vanilla has some php session problems, so i get logged out like clockwork every 30 minutes. something that i've had happen to me a couple times so far (mostly because we haven't spent the time to fix the session nonsense): i'll start a post, and then take a phone call, and then come back to the post and finish it up, but by this time 30 minutes have elapsed and i'm logged out... but won't know it until the refresh! consequently, i'll hit the post button, and then i get a php error. i don't know the text of the error (i can get it, it it would be helpful), but it's basically just a "not logged in" message. from this screen, if you click back, you do not get the text of your post back - you come to a logged-out version of the thread you were attempting to post to. what i would like to propose is some sort of catch for this error that doesn't lose the text of the post. i'm not asking for it to log you back in, but perhaps offer the login box. unstyled php errors are unsexy, and losing the text of a post i've been working on for 45 minutes is uberfrustrating.

Comments

  • Options
    MarkMark Vanilla Staff
    1. Did you have the "remember me" box checked when logged in? 2. What is the url to your forum? 3. What have you set as the cookie domain for your forum? 4. Do you have cookies enabled in your browser? 5. Can you provide the exact text of your error?
  • Options
    1. yes.
    2. thirty5.net
    3. no idea, but like i said, we haven't devoted time to fixing this, and i certainly don't expect you to. we'll get to it eventually, but this is not my concern at all.

    the exact error comes from post.php:
    Fatal error: Call to a member function on a non-object in /home/thirty5/www/post.php on line 38

    again, i'm not concerned about the clockwork logouts - i'm sure it'll eventually boil down to some arcane php.ini setting or some old sessions still intact from our old forums.

    what i'm suggesting is a catch for this specific error that (i'd assume) would happen anytime you attempt to post something only to discover that your session had timed out between the time you got the post box to type in and when you clicked the button.

    say a user that is not logged in at all somehow gets a post box. i'm not sure if this is even possible, but if he attempts that, i think he should be greeted not with a php text error but a proper catch from vanilla prompting him for a username and password to proceed.
  • Options
    could you go to the appg settings file, or the application settings page (settings > application settings) and tell us what the Cookie domain is set to? This will answer question 3.
  • Options
    hold up nathan - we're looking the wrong direction. what i'm talking about is very easy to duplicate. follow these steps: 1.) open up vanilla in two seperate windows or frames or tabs (of the same browser) 2.) log in to one of them. you should be able to refresh the second and see the login due to the session. 3.) go to a thread that you can post to in one of the windows, and in the other, just logout. 4.) after you've clicked logout in in the second window, attempt to post in the thread in the first window. assuming my logic holds, you should see the error i'm talking about. i really appreciate your desire to solve my issues with the cookies/sessions, it speaks well of this community! but that is an issue for another day.
  • Options
    i don't think josh is disputing the fact that vanilla is giving an error message. i think what he's trying to say is that the error message should be more human-friendly. right now it's giving a php error, when instead it should probably say something like "you must login before you can do that" and redirect you to the login page, which would then take you back to a page which would have your typed comment still intact.
  • Options
    word.
  • Options
    MarkMark Vanilla Staff
    edited September 2005
    That error has already been documented as the very first major error in Vanilla on the bugs list:

    Major: Level 4: Bugs that are simply a major annoyance mostly for users. Date Author Description 2005-07-28 Lech Thread: Lussumo main forum and 0.9.2.2: If you’re running an open forum, Log out & attempt to access post.php the desired redirect is lost and a possible error occurs

    http://lussumo.com/docs/doku.php?id=vanilla:bugs

    That bug will be fixed in the next rev, but the real problem you are having is with your cookies - You shouldn't be able to duplicate that bug without actually signing out as the bug report describes, but because your cookies aren't working properly, it is happening without the sign out. So, fix your cookies and you probably won't see that error anymore.
  • Options
    awesome, thanks mark. we'll get around to those darn cookies someday, i'm sure. keep up the excellent work!
  • Options
    Heh, bugs page? Why would we think to look there? ;)
  • Options
    Oh. I see now. It's been documented now. Unless any of you want to fix it yourselves, it is out of out hands.
This discussion has been closed.