0

I'm trying to debug an error on this site: www.naijastories.com.

When I click on the 'Donate' link on this page, nothing happens, even though a pop-up is supposed to appear.

Digging deeper and using the IE developer function, I see that the following error is reported:

"Object doesn't support property or method 'prompt'"

The object in this case is the jQuery object, and the error occurs in the /wp-content/plugins/cubepoints/modules/donate/donate.js file.

The line with the error is

var $imp = jQuery.prompt(donatePrompt);

prompt is the missing property.

This is strange, because the prompt property is set in the first line of another js file - /wp-content/plugins/cubepoints/modules/donate/jquery.impromptu.4.0.min.js - which is loaded just before the donate.js file is loaded.

Is the problem that the donate.js file is not seeing what has been done in the jquery.impromptu.4.0.min.js file?

How do I find out why the jQuery global is not being properly populated with the prompt property?

10
  • 1
    Where's the donate link? Commented Nov 2, 2014 at 4:41
  • Sorry about that, @arao6. I realised that the link only showed up in authenticated pages, so I've created a special page with the link. I've edited the original post to include a link to the page. Commented Nov 3, 2014 at 1:48
  • I get "You must be logged in to make a transfer!" when clicking the donate link, no error in console. Commented Nov 3, 2014 at 4:42
  • This is quite bizarre. @arao6. You are getting the exact message that you should be getting, which means that this could be a client error. Can you tell me your client setup? I've tried deleting my cache and cookies, but that makes no difference. I've tried this on different browsers, and I get the same error. I've forced a cache refresh of the script from the server - same issue. I'd really love to know what you've done at your own end to resolve the issue. Commented Nov 3, 2014 at 16:20
  • 1
    @arao6, I found the problem - it was an outdated script in an ad which was conflicting with the site's script. Can you make a post so that I can accept it as the answer? Commented Nov 4, 2014 at 21:57

1 Answer 1

1

It looks like jQuery.prompt only exists in Chrome, but not in IE, which hints that there's a conflict somewhere with the Impromptu plugin and something else and it's browser-specific. You need to be able to type $.prompt into console and see the function instead of TypeError: Cannot read property 'prompt' of undefined, which I see on your page but not http://trentrichardson.com/Impromptu. Note that this seems to happen in IE and not the other browsers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.