1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed Closed forum phrase bug

Discussion in 'Resolved Bug Reports' started by SchmitzIT, Apr 7, 2011.

  1. SchmitzIT

    SchmitzIT Well-Known Member

    I just tested posting to a closed forum, and see the following error:


    may_not_perform_this_action_because_forum_does_not_allow_posting
    There is a phrase called: you_may_not_perform_this_action_because_forum_does_not_allow_posting
    I am guessing that is what was intended to be shown. So just a minor typo, but a typo nonetheless ;)
     

    Attached Files:

  2. SchmitzIT

    SchmitzIT Well-Known Member

    Oops. Forgot. Running 1.0.0, cause I'm a rebel and I like living on the edge. Perhaps this was addressed in 1.0.1.
     
  3. Brogan

    Brogan XenForo Moderator Staff Member

    Looks like it's fixed in 1.0.1.

    I just tested it on my base 1.0.1 installation.
     
  4. SchmitzIT

    SchmitzIT Well-Known Member

    Lemme upgrade so I can confirm.
     
  5. SchmitzIT

    SchmitzIT Well-Known Member

    Actually, while my files upload, I checked the code. For a post in a closed forum, the phrase is correct. It's in threads.php in 1.0.0 the phrase is wrong.

    Line 628 - 632
    Code:
            if (empty($forum['allow_posting']))
            {
                $errorPhraseKey = 'may_not_perform_this_action_because_forum_does_not_allow_posting';
                return false;
            }
    
    and line 939-943:
    Code:
            if (empty($forum['allow_posting']))
            {
                $errorPhraseKey = 'may_not_perform_this_action_because_forum_does_not_allow_posting';
                return false;
            }
    
    I'll revert if the problem is gone in 1.0.1.
     
  6. SchmitzIT

    SchmitzIT Well-Known Member

    This is not fixed in 1.0.1.

    However, it has a fairly obscure recreation path. I'm in the middle of documenting a few things concerning the Node Tree, and created a forum that way. I run a seocnd browser where I am logged in as a regular user. I created a thread with that regular user, and posted it. Then in the first browser, I set the node to not allow new messages.

    Switched back to the second browser, where the reply button then still is visible. Tried to post a reply, and then see the above behaviour. If I totally refresh my browser, the forum will correctly state I have insufficient priviledges to post, rather than offering a reply button.

    To confirm, use two browsers, and ensure the setting is set to be open for posting when you load the regular user window. Once done, CTRL + F5 to flush browser cache. Reply button will become visible. Switch back to admin window, and turn off option to allow posting.

    Switch back to regular user browser, and attempt to reply.
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    Testing now...

    I actually get this:

    error.png


    If I do it when already in a composed thread, I see this:

    error_overlay.png
     
  8. SchmitzIT

    SchmitzIT Well-Known Member

    Odd. I just checked the 1.0.1 version of threads.php (in Library/XenForo/Model, and the lines indicated above are still the same. The bug should still exist. Just odd you see a different message than I do.
     
  9. Mike

    Mike XenForo Developer Staff Member

    I have fixed this now. I think the confusion is that creating a thread is fine; it's only replying to a thread that was broken (well, and voting on a poll).
     
    SchmitzIT likes this.

Share This Page