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.
Options

editdiscussion Page Not Found

Is there something I need to toggle to make this work? I can edit as an admin but not as a normal registered user.

When I try and edit a post I made it says the page is not found.

Note - I also have this line in my config

$Configuration['Garden']['EditContentTimeout'] = '-1';

What am I doing wrong?

  • Mark

Comments

  • Options
    EclipseEclipse New
    edited March 2016

    Try going to Dashboard>Forum>Advanced and changing the Discussion and Comment Editing field:

    I'm new to Vanilla, but a value of '-1' in a 'Timeout' setting usually means 'never allow'
    Edit: I suppose it could also mean 'always allow' haha

    vf2.JPG 19.8K
  • Options
    R_JR_J Ex-Fanboy Munich Admin

    @Eclipse said:
    I'm new to Vanilla, but a value of '-1' in a 'Timeout' setting usually means 'never allow'
    Edit: I suppose it could also mean 'always allow' haha

    You are correct :mrgreen: But when in doubt, look at the source: -1 means no timeout. 0 means immediate timeout. > 0 is in seconds. 60 * 60 = 3600 (aka 1hr)

    It would through a permission error if editing is not allowed.

    Look at following urls:
    1. the url of your discussion
    2. the link that you as a admin see for editing the discussion
    3. the link that a normal user sees for editing this discussion

    Are there any peculiarities?

  • Options
    edited March 2016

    The URL of a discussion would look something like this :

    http://mysite.com/community/discussion/2/start-here#latest

    The URL to edit for an admin looks like this :

    http://mysite.com/community/vanilla/post/editdiscussion/2

    The URL to edit for a normal looks like this :

    http://mysite.com/community/vanilla/post/editdiscussion/postID

    where postID is the ID of the post they are trying to edit.

    (Side note - I have "solved" this problem in a way by not displaying the editing tools anymore - but giving users the ability to edit would be nice)e

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    So the url for admins and users is the same but users get a "Page not found"? That's strange. Sorry, I have no idea on that :(

    If it only happens to you, deleting browser cache might help, but I do not really believe that...

  • Options

    I'm assuming you mean that it is saying "page not found" in a popup and not actually redirecting you to a 404?

    I'm not sure if a plugin/theme/addon/etc can modify a class controller, but check to see if any of them are trying to override the file 'class.postcontroller.php' found in [your forum directory]/applications/vanilla/controllers and check that core file itself in case it was changed.

    It should look like (originally starting at line 548):

        // Check permissions
        if ($Discussion && $Editing) {
            // Permission to edit
            if ($this->Comment->InsertUserID != $Session->UserID) {
                $this->permission('Vanilla.Comments.Edit', true, 'Category', $Discussion->PermissionCategoryID);
            }
    
            // Make sure that content can (still) be edited.
            $EditContentTimeout = c('Garden.EditContentTimeout', -1);
            $CanEdit = $EditContentTimeout == -1 || strtotime($this->Comment->DateInserted) + $EditContentTimeout > time();
            if (!$CanEdit) {
                $this->permission('Vanilla.Comments.Edit', true, 'Category', $Discussion->PermissionCategoryID);
            }
    
  • Options
    noncenonce Necro-on Forensics
    edited March 2016

    follow the typical troubleshooting protocol to solve your issue. see tutorials.
    other addons applications, plugins and themes can have unusual unexpected impacts.
    you had trouble with yaga before - did you test after disabling yaga and other plugins and reverting to the default theme.

Sign In or Register to comment.