Support » Theme: P2 » Sort of resolved ;) Couldn’t post from front end on network sites

  • Hey ho.

    No guru with jquery so please let me know if I have erm, messed this up is the polite way of putting it! 🙂

    I am running a few sites on the 4.6.1 WordPress network version on Ubuntu with PHP v. 7.0.8.
    Problems appeared with Chrome Version 54.0.2840.71 m, IE 11 and Edge on Windows 10.

    Two problems:
    1. Oops not logged in blah blah.
    2. Wouldn’t post when Submit button clicked.

    1.
    After much searching, I came across a problem with the response in p2.js isUserLoggedIn at the 120’s line where the response had a space in front of it e.g. ‘ logged_in’. I just added a trim ( response = $.trim(response) ) and it worked fine. No more oops.

    2.
    When the submit button was clicked it just sat there. Did nothing. Didn’t go off to a URL of any kind. Nadda. Zip. Nowt. So after much more digging, I found (now please note I am no guru with jquery) that down at the lines around 1000 again at isUserLoggedIn then at the line containing: if ( 'prop' in thisFormElements ) I addded this: var $thisDoesNotWork;
    which resulted in two lines of:

    var $thisDoesNotWork;
    thisFormElements.prop( 'disabled', false );

    and guess what. The damn thing posted the comment and showed up as it should. Go figure.

    Please note: To all those users who think that just making these changes will fix their problems, DON’T! Not unless you know what you are doing (must take my own advice sometime). Make backups and check the forums for alternative answers first. This may just be related to my own installation and may not necessarily work with yours.

    As I started this post with Please let me know if….. Please! let me know!!

    Ken.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn

    (@zoonini)

    Automattic Happiness Engineer

    Thanks for posting your solutions. I’ve let our developers know in case this is something that should be fixed for others as well.

    Did this issue crop up all of a sudden after using the theme for a while, or did it happen from the start, when you first started using the theme? If it cropped up suddenly, did you make any changes on your server that might coincide?

    Sorry should have made that clear.

    The server has been used only for development but the installation of P2 was a fresh install on a new site and the errors were happening right from the start.

    I’ve been over my logs and versions saves just to make sure but there were no server changes at the time of the install nor any since. I’m afraid I haven’t had time yet to look and see why the response from the ajax call had a space in it but I will let you know as soon as I find out.

    Ken.

    B.T.W. I would love to know why just adding any old thing after if ( 'prop' in thisFormElements ) made that part of it work. Didn’t matter what I put there, as long as there was a line with something in it the call worked but leaving just the next line, well, nadda.

    Ken.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sort of resolved ;) Couldn’t post from front end on network sites’ is closed to new replies.