Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


[Solved] Captcha not loading/refreshing

edited March 2012 in Questions
This discussion is related to the Anonymouse addon.

With anonymouse, if the user enters an incorrect/does not enter a captcha code, the image is either not reloading or disappearing altogether, and I have no idea why.

Any thoughts?

Best Answer

  • bh8vnbh8vn
    Answer ✓

    Sorry I reply the vanilla auto email sender ;( Simply go to my site: http://bh8.vn, go to a discussion page and view the source, save the anonymous.js of my site and replace your old js with mine, it will work, sorry I can show you in detail, i reply by mobile.

Answers

  • It is a jquery conflict, let me know your site

  • edited March 2012

    (deleted)

    And thanks!

  • edited March 2012

    Anonymouse is also allowing users to post in root. I'm disabling this ability in the plugin settings, but the settings do not save (using the dashboard); they just revert back.

  • I replied your messenge through email.

  • Forgive me but I cannot find your email/message. Where did you send it to?

  • No problem haha. I'll test it as soon as I'm home, thanks!

  • I replaced mine accordingly, and it didn't work. Now instead of not refreshing the image it simply gets rid of the image (doesn't provide a new captcha). Still not sure what's going on.

  • 422422 Developer MVP

    Are you using minify or js compress?

    422 Real Estate Australia , now open Check it out

  • Nope, I'm not.

  • edited March 2012

    Since it initially shows the captcha but will not after an incorrect entry, it would have something to do with this code, would it not?

          // 1. Update captcha if post fails
          $("div.Errors > ul").livequery(function(){
              var imagesrc = gdn.combinePaths(WebRoot, '/plugins/Anonymouse/captcha/imagettfbox.php' + '?' + Math.random());
              var $img = $('#CaptchaBox img');
              if ($img.length > 0) $img.first().attr('src', imagesrc);
          });
    

    I really don't understand php/jquery and how it works, so sadly this is something I'm completely lost with trying to troubleshoot on my own.

  • 422422 Developer MVP

    The above loads if captcha fails, so is the path correct?

    Try absolute path.

    422 Real Estate Australia , now open Check it out

  • Yup, the path is correct as well.

  • 422422 Developer MVP

    No idea , then. I dont use anonymouse

    422 Real Estate Australia , now open Check it out

  • No problem, I appreciate you looking at it. Hopefully @bh8vn will be able to provide some more insight on the issue.

    422
  • I think the jquery.js appear two times in your source, when you add the js for the menu, it's no need to add more jquery, it make the conflict. Tell me if it still not work. I deal with the problem better if it on my site :)

  • edited March 2012

    Sadly that wasn't it either.

    It's undoubtedly due to Jquery and the use of it in my menu, because when I switch to my theme without the menu, Anonymouse functions perfectly fine. I just have no idea why it is still an issue or how to fix it.

  • @422 excuse my ignorance but, upon reading up and looking at what it actually loads, I do believe I use minify (it loads a jquery.min.js). After tinkering with it for a bit, I managed to get the captcha to work and reload after an incorrect attempt while making a new post, but it still fails if you enter it incorrectly while making a new reply to a discussion.

  • 422422 Developer MVP

    Yer jquery.min is not minify. Have you disabled anonymouse and tested? The issue probably lies with the plugin.

    422 Real Estate Australia , now open Check it out

  • The current issue is that if you enter an incorrect captcha in a reply to a discussion (the captcha for creating a new discussion works 100% now), it'll redirect you to /post/comment instead of keeping you on the current page and simply providing a new captcha. This occurs for me even if I change theme to one which doesn't use additional Jquery in it, so yes I'd assume this one is directly related to the plugin. @bh8vn 's works exactly as it should, so maybe he'll be able to take another stab at it for me.

  • 422422 Developer MVP

    Probably list vanilla version, and plugins you use so he can narrow the issue down.

    422 Real Estate Australia , now open Check it out

  • Using: Anonymouse (latest version), DiscussionExcerpt2, Flagging, latest version of Vanilla

    422
  • Why did you deleted the original JQuery

    [IMG]http://a.imageshack.us/img403/6169/bh8dotvnjquery.png[/IMG]

    So nothing work at all.

    The first time you send me a message, I test it and it work fine then it not refresh then it move to another page when captcha not refresh, a little bit confusing :P

    And your anonymous.js don't look like me at all, it lack of: jQuery.noConflict();

  • edited March 2012

    I apologize, you must have been viewing my page while I was making attempts to fix it.

    My anonymouse.js does include your jQuery.noConflict(); statement. Again, I'm not sure why or how, but for some reason now when you attempt to reply to a discussion it'll redirect you. If you try to reply to any discussion I'm sure you'll see what I mean.

    Sorry for any confusion/difficulty I've caused you.

    Edit: I don't know why I get those jQuery errors either...

  • edited March 2012

    Alright, I sorted out a lot of issues... I had somehow gotten rid of all the script calls... not sure how. This is the only error I'm getting now...

     GET (some_site)/plugins/Anonymouse/captcha/imagettfbox.php?0.5908362807240337 404 (Not Found)
            f.extend.attrjquery.min.js:2
            e.extend.accessjquery.min.js:2
            f.fn.extend.attrjquery.min.js:2
            $.extend.registerPlugin.$.each.$.fn.(anonymous function)jquery.livequery.js:178
            $.extend.registerPlugin.$.each.$.fn.(anonymous function)jquery.livequery.js:178
            $.ready.$.livequery.senderanonymouse.js:15
            $.livequery.runjquery.livequery.js:126
            e.extend.eachjquery.min.js:2
            e.fn.e.eachjquery.min.js:2
            $.livequery.runjquery.livequery.js:125
           $.extend.checkQueuejquery.livequery.js:151
    
  • Finally fixed it...

    It was a combination of your fixes and me fixing my stupidity which finally got it working. Your anonymouse.js file was correct, but when I copied it over I stupidly forgot to change my path (I have vanilla installed in a folder named main), so it wasn't locating the captcha image.

    Thanks @bh8vn, and thanks for putting up with all my questions!

  • You're welcome, have fun with your work ;)

Sign In or Register to comment.