Skip to:
Content
Pages
Categories
Search
Top
Bottom

Can only post in Firefox


  • GuyLeech
    Member

    @guyleech

    As of fairly recently, other users and I have only been able to post in Firefox. In all other browsers the error message of “Your attempt to create this topic has failed.” comes up.

    The bbPress is not hooked up to a WordPress install, and is running no plugins. I haven’t touched the core code, only the template files (and I’m aware they’re slightly out in IE).

    I’ve tried with both a newly registered account, and using my Admin account – both work in FF, but not in anything else.

    If anyone could offer some guidance as to why this may be, it would be greatly appreciated.

    The URL is: http://support.westciv.com

    Cheers

    Guy

Viewing 12 replies - 1 through 12 (of 12 total)

  • _ck_
    Participant

    @_ck_

    Hmm, this is going to require some thought…

    That error occurs when bbPress thinks the source of the post is not coming from bbPress (ie. a spammer trying to do a direct post without first visiting the topic)

    The way that’s done is there’s something called a “nonce” which is vaguely like a hidden captcha code that is automatically sent along with the post (via POST data) to tell bbPress it’s genuine.

    So for some reason it’s not getting that “nonce” other than Firefox, which is incredibly strange. Do you happen to have a personal firewall or some kind of add-on that’s blocking certain data like that?

    I would do a “view source” in both firefox and IE on a page with a textarea (http://support.westciv.com/?new=1) and look at the fields inbetween <form> </form>. See if anything is different.


    _ck_
    Participant

    @_ck_

    I have another idea why it might only work in firefox.

    It’s possible you are somehow sending malformed HTML with a damaged or buggy template and only Firefox is able to interpret it correctly while the other browsers munge the bad code and therefore leave out the missing hidden input fields.

    Look carefully at your post-form.php template and see if there is any incorrect HTML. Also try doing a direct download of that ?new=1 page instead of looking at it in a browser and study the source for malformed HTML, for example an <input field without the closing > .

    (you could even temporarily replace post-form.php template from the original kakumei theme just to see if it works)


    chrishajer
    Participant

    @chrishajer

    In both IE7 and FF3, I get this error when trying to edit my profile:

    Your attempt to edit this user's profile has failed

    No difference between the two browsers, both fail.


    chrishajer
    Participant

    @chrishajer

    Another data point: I was able to remove and add tags in FF3 but not with IE7. This is the failure message:

    Your attempt to add this tag to this topic has failed.

    The error messages are all found in bb-includes/functions.php starting at line 2320 (just so you can see what should fail and what message should be shown.)


    chrishajer
    Participant

    @chrishajer

    More data. Here is the request to add a tag when using FF3:

    cookie=bbpress_a2763cd41fe17b461fa952334e00e45c%3Dchrishajer%257C1216783299%257Cb630b90e0e5d52cf8499cfbe58629223&action=add-tag&tag=style.css&id=350&Submit=Add&_wpnonce=bd6cc486c3&_wp_http_referer=%2Ftopic.php%3Fid%3D350&topic_id=350&_=

    Here is the same request when using IE7:

    tag=style.css&id=354&Submit=Add

    FF3 works, IE7 does not.


    chrishajer
    Participant

    @chrishajer

    Take a look at this source.

    <form id='tag-form' method='post' action='http://support.westciv.com/tag-add.php'><fieldset>
    <form method="post" action="http://support.westciv.com/tag-add.php">

    <input name="tag" type="text" id="tag" size="10" maxlength="30" />
    <input type="hidden" name="id" value="354" />
    <input type="submit" name="Submit" id="tagformsub" value="Add" />

    </form>
    <input type="hidden" name="_wpnonce" value="907a29b341" /><input type="hidden" name="_wp_http_referer" value="/topic.php?id=354" /></fieldset></form>

     

    I don’t think bbPress normally has a form within a form for adding a tag. Not sure if that’s a problem or not, but the hidden fields for_wpnonce and _wp_http_referer are outside the first form tag: maybe FF can handle it but other browsers cannot?


    chrishajer
    Participant

    @chrishajer

    I saved that page locally, edited the HTML to remove the outer<form> tag, and submitted with IE7, and the tag was added. It looks like the nested form is only handled by Firefox, or some browsers.

    I’m not sure if the same problem exists in other areas where you get the failure to create a new topic or a reply.


    chrishajer
    Participant

    @chrishajer

    Looks like the New Topic page has nested form tags, with the hidden values outside the inner form as well, which would explain the failure there too.


    _ck_
    Participant

    @_ck_

    The templates need to be double checked, something is corrupted or had bad html as I suspected.


    GuyLeech
    Member

    @guyleech

    chrishajer, _ck_,

    I’ll take a look at the templates. I’ve only just inherited the system, so I have no idea how it was setup.

    Thanks for the help

    Guy

    EDIT: Yep, removing the nested form does the trick. I should have checked out the source code before bothering you, sorry. Thanks again for the help.


    chrishajer
    Participant

    @chrishajer

    For reference, I just ran across this as well:

    http://www.w3.org/TR/xhtml1/#prohibitions

    form
    must not contain other form elements.


    GuyLeech
    Member

    @guyleech

    Yes, the validators don’t like nested forms either. Hence why I should have checked source before bothering you – would have saved time for both of us.

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.