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

Unauthenticated comment preview error (on this forum)

edited March 2007 in Vanilla 1.0 Help
I've tried to preview a comment while not being authenticated, and I've got this message:
Fatal error: Call to a member function on a non-object in /applications/lussumo/community/extensions/CategoryJumper/default.php on line 58

Comments

  • Options
    it's not checking if the variables actually exist/are initialized. the condition on line 57 should be changed from if (in_array($Context->SelfUrl, array('index.php','comments.php')) && $Configuration['USE_CATEGORIES']) { to if (isset($Head) && in_array($Context->SelfUrl, array('index.php','comments.php')) && $Configuration['USE_CATEGORIES']) { (or something to that effect)
  • Options
    I see, it's still the same problem then. Mark should update Category Jumper.
  • Options
    MarkMark Vanilla Staff
    I hope you don't mind, but I edited previewpost and upgraded the version, Sirnot. I also had to upgrade the ExtendedTextFormatter to check for some variable's existence before checking their values. I've uploaded both of the fixes and upgrade revisions to the add-ons site and I've uploaded the new extensions here to the community.
  • Options
    MarkMark Vanilla Staff
    There was technically nothing wrong with the category jumper. If I started updating the category jumper, then every other extension that uses the comments.php page and accesses objects on it would also break because of the preview post extension. The better answer was to make the previewpost extension a little more compatible with the others because it was the previewpost extension that was resetting the context object's selfurl and causing all of the other extensions to think they were on a page that they weren't.
  • Options
    MarkMark Vanilla Staff
    fyi - sirnot, I think another option would have been to include the init_vanilla instead of init_ajax, but creating the dummy objects like I did works just as well, I reckon.
  • Options
    yeah just seems like a lot of extra baggage when it can be avoided by a simple variable check.
  • Options
    StashStash
    edited March 2007
    Fatal error: Call to undefined function: getunreadquerystring() in /applications/lussumo/community/extensions/PanelLists/default.php on line 72

    Is what happens when I try and preview a post on this forum.
  • Options
    edited March 2007
    Now I get the same error than Stash, but on line 106.
  • Options
    MarkMark Vanilla Staff
    I can't duplicate it.

    What exactly is the text you were previewing?
    Were you signed in when you tried to preview?
  • Options
    edited March 2007
    Doesn't matter if its text or html, any text even blank :) I'm logged in and it gives me error Fatal error: Call to undefined function: getunreadquerystring() in /applications/lussumo/community/extensions/PanelLists/default.php on line <strong>106</strong> Not logged in it works fine
  • Options
    NickENickE New
    edited March 2007
    it looks like you have to have your forum preferences set to display some sort of discussion list in the panel for this to happen (eg. 'Display your discussions in the control panel'). fixing it should be as simple as adding if(!isset($Head)) return; to the beginning of the extension
  • Options
    MarkMark Vanilla Staff
    SirNot - I'm sure you can understand why it would be better to fix it in your extension than every single other extension. Let me see what I can come up with...
  • Options
    MarkMark Vanilla Staff
    Okay, I fixed it here and uploaded the fix to the add-ons site, too.
  • Options
    Works. thanks Mark What did u change?
  • Options
    MarkMark Vanilla Staff
    There was a setting that is configured in the init_vanilla.php file that isn't configured in the init_ajax.php file. I added it to sirnot's extension (which uses the init_ajax.php file).
This discussion has been closed.