[resolved] Javascript error in Safari & Chrome, WordPress 3.5 (26 posts)

  1. bobk88
    Posted 3 years ago #

    From Chrome's error console:

    Uncaught Error: cannot call methods on slider prior to initialization; attempted to call method 'option' query.js:2

    Safari's error console says the same (except it omits the word 'uncaught').

    This started after I updated from WordPress 3.4.2 to 3.5 yesterday.

    Safari 6.0.2, Chrome 23.0.1271.97, running in Mac OS 10.8.2 on a Mac Pro 8-core.

    mp3-jplayer 1.7.3 with customized GUI (customization was not done by the plug-in's author, and AFAIK it did not involve altering Javascript - just css)

    This error doesn't seem to occur in Firefox 17.01. It correlates with several problems - files not playing back, multiple songs being selected at once upon successive clicks, page jumping up to the top after clicking on a song, problems with time display, etc.

    I tried the following, and the problems remained:

    1. switched to the Twenty Twelve theme

    2. disabled all other plugins

    3. tried SCRIPT_DEBUG per these instructions in the Codex

    Clearing the browser cache and then re-loading the page seems to resolve the issues in Safari, and then the player works as expected; but this doesn't seem to help in Chrome.

    Test page is here.


  2. dagobertdebug
    Posted 3 years ago #

    hi, same here, does anyone have a solution yet? chers, debug.

  3. bobk88
    Posted 3 years ago #

    I deleted the plugin and did a fresh install. (Mine had a customized GUI with additional CSS and button images.)

    The fresh install with default skin showed similar problems in Chrome and Safari (Mac).

    The problem seems to involve the jQuery UI slider (ui.slider.js). Someone with more javascript experience echoed this finding, and suggested it might be a conflict between the older version of js included with the plugin and the newer version installed with the WordPress 3.5 update.

    I emailed the developer about these issues, but so far haven't heard anything. He appears to have abandoned this plugin, at least as of now. No posts from him in 9 months. Sad, because he seem seem to have put a lot of work into the plugin. And frustrating - I spent a lot of time customizing the GUI, and now I'm back to square one.

  4. dagobertdebug
    Posted 3 years ago #

    okay, is see... you are totaly right, it's a great player/project! what i did for my site is to downgrade back to 3.4.2 since the player is very important to my site since it's for a musician. it worked after that tutorial: http://etuts.org/manually-downgrade-wordpress/

    would be great to post it here if someone knows any workaround, maybe an upgrade to new jplayer (http://www.jplayer.org) should be considered....

    chers, dago

  5. bobk88
    Posted 3 years ago #

    I'm a musician, so audio is crucial to my site.

    I thought the usual recommendation is to stay with the latest version of WP since they fix security issues. So I'm basically afraid to go back! :)

    I'm looking into using jplayer or soundmanager2 directly rather than via a plugin. I don't yet know how to do that, but it might be worth it in the long run. I wouldn't mind paying Soundcloud and using their players on my site, but I don't like any of the GUIs (I don't want to see waveforms except when I'm recording and editing!).

  6. bobk88
    Posted 3 years ago #

    More troubleshooting info to add to my above posts.

    Here's the simplest way to see the problem:

    In Safari and Chrome (Mac), if the first thing you do after the page loads is click the 'play' button, the player seems to work ok. Subsequent clicks on another song will cause it to load and begin playback, as expected.

    However, if the first thing you do after the page loads is click on a song title instead, that title loads into the 'current track' display at the top of the player, but playback does not start, and if you had to scroll down to see the player, the page jumps back up to the top.

    If you then click on the play button, the selected song will play back, but with the following issues:

    1. The 'elapsed time' readout remains at 0:00.

    2, The 'total time' readout does not appear.

    3. The playback progress bar does not appear, and clicking along the timeline does not have any effect (it should cause playback to jump to the location where you clicked)

  7. Frutke
    Posted 3 years ago #

    Version 1.7.3 of MP3-jPlayer ships with a 1.8.10 version of jquery-ui.js.

    Don't know if this'll help, but could you try replacing the ui.slider.js file (in the plugin's js folder) with an updated version and let us know if it helped?

    Version 1.9.2 of jquery-ui.js is available at http://code.jquery.com/ui/1.9.2/jquery-ui.js.

  8. bobk88
    Posted 3 years ago #

    I'd been wondering about that.

    But when I spoke with the developer yesterday, he said that mp3-jplayer first looks for WordPress' included jQuery libraries (in the folder wp-includes); the versions in the plugin's folders are only there in case they're missing from WordPress for some reason.

    Per his suggestion, I checked in Firebug and saw that indeed WordPress 3.5's versions of jQuery (1.8.3) and jQuery UI (1.9.2) are being loaded.

    I don't know if this has any effect on the problem, but I told him that in WP 3.5, they changed the convention for suffixes for minified .js and .css files.

    He said he'll look into the issue, but didn't say exactly when. Here's hoping....!

  9. The Assembly
    Posted 3 years ago #

    Ack! I'm having the same issue and I need it for a project due next week.
    If anyone resolves the issue, please post!

  10. kwilson2
    Posted 3 years ago #


    I'm surprised the downgrade worked for you. I never upgraded to WP 3.5 and I'm experiencing the issue as well. Though the issue for me seems to only exist for the text-based players and playlist widget when there are text players also loaded on the page. The playlist player widget works fine on my homepage and all other pages that don't include the text-based players.

    For these text players, I just get dud links that say "Play" but don't do anything. Not even jump to page top.

  11. kwilson2
    Posted 3 years ago #

    Go ahead and ignore my last post. The issue I was having was merely having a sidebar widget exist at the same time as a shortcode in main content area. This didn't used to cause a problem, but as soon as I removed the sidebar playlist widget, the individual mp3 players began working again.

    Tested in Chrome, Safari, & Firefox
    Running WordPress 3.4.2 (afraid to upgrade!)

  12. @satori83
    Posted 3 years ago #

    Did you ever hear back about this issue? I was about to build a site with this and now Im hesitant.

  13. bobk88
    Posted 3 years ago #

    Yes - the developer email me last week saying he fixed the plugin and it would be available over the weekend. That didn't happen.

    I recommend not using this plugin. I ended up using jplayer directly in my site (not via a plugin).

  14. @satori83
    Posted 3 years ago #

    Im a little annoyed because I just bought Jplayer Woocommerce extension so I wonder how thats gonna work. How is the direct code working out? Any issues?

    Is it difficult to set up manually? Because my client was hoping to be able to update it after Im finished!

  15. bobk88
    Posted 3 years ago #

    Direct code is working fine so far.

    Jplayer's site has a 'Quick Start' that walks you through the installation on a regular web site. You have to figure out how to adapt that to your WordPress theme.

    I'm using a paid WP theme called Catalyst. It provides areas where you can insert scripts easily into pages, the header, or both. I'm using these, and they seem to be working fine.

    If you don't have that kind of feature, maybe you could write a simple plugin just to add the jplayer script(s) via 'enqueue_script.' (Or maybe there are plugins that make it easy to add your own scripts - try searching the repository.)

    Note that WordPress uses jQuery in 'no-conflict' mode (see the above link, about half way down the page). The bottom line is that you have to write 'jQuery' instead of using the dollar-sign shortcut ($) in the script where you add the links to your audio files. There were only 3 or 4 instances of this, so it's not a big deal.

    Unfortunately, this is NOT mentioned on the jPlayer site, since their tutorial is aimed at regular (non-Wordpress) sites. Since I'm not a developer, I didn't know the details about using non-included scripts with WordPress, and spent a lot of time wondering why jPlayer wasn't working until I stumbled on the above page.

    jPlayer requires the core jQuery library. In my site, other plugins are already calling in jQuery, so I didn't need to include a script for that.

    Note that in the Quick Start they link to an external jQuery library hosted by Google; if you weren't already aware, you should either use WordPress' included library, or disable it if you want to use an external one. Calling in two instances of a script can apparently cause problems and is not recommended.

    Hope this helps.

  16. jeff8v7
    Posted 3 years ago #

    I'm looking forward to a fix too. I really liked this plugin :-)

  17. jumpinsteph
    Posted 3 years ago #

    same problem... hope the developer can find a solution for these great plugin.

  18. jumpinsteph
    Posted 3 years ago #

    well for me it seems that the problem come from the plugin Tubepress... If you deactivate it, everything is working fine.

  19. jeff8v7
    Posted 3 years ago #

    The developer send an email today that the fix is ready and should be out in a few days. I'm hoping a few days is quick, so I send a 20 GBP donation his way. If you want a fix soon, I suggest others do the same.

    This is the best way I know to motivate and reward developers for their effort. After all, I'm sure this guy has put in a ton of work on this. And, that's all work I didn't have to do myself :-)

  20. bobk88
    Posted 3 years ago #

    Anyone new to this thread: I encourage you to read my previous couple of posts.

    Bottom line: if you need a reliable music player, I would recommend not using this, for the following reasons:

    1. It's been broken in Safari and Chrome since the release of WP 3.5 nearly two months ago (see original posts for details).

    2. For at least the past year (when I started using it), the current version has not correctly displayed playlists in recent versions of Opera in recent versions of Mac OS X (and PC too, if I recall correctly). I thought it was a CSS problem, but a developer recently suggested that it's a jQuery problem.

    3. Developer has not answered any forum posts for over 9 months.

    4. Plugin hasn't been updated in nearly 17 months.

    5. Two weeks ago the dev told me the update would be released over the weekend, and that didn't happen.

    As I said in my review, Simon seems to have put a lot of work into this plugin, and it has useful features and flexibility that I haven't seen in other music player plugins, free or premium.

    If the reasons I mentioned above don't matter to you, then go for it.

  21. @satori83
    Posted 3 years ago #

    When I wrote the dev he supplied this info a week or so ago:
    ME- how long till update?

    DEV- Three weeks (we haven't started yet) but it will be similar to http://wordpress.org/extend/plugins/wp-miniaudioplayer/stats/ Will be about a month before releasing.

    ME- Cool...thanks for reaching out. When the new version is released will it be in WP repo again or a premium offering?

    DEV- It will be a premium offering at around $20. We're busy creating jPlayer.it which aims to be a store where you can download free and paid-for skins and plugins.

  22. bobk88
    Posted 3 years ago #

    Scott: was that correspondence with Simon? Or with one of the Happyworm guys?

    I'm asking because one of the Happyworm guys is in Italy (according to their site), and the .it domain is Italy. Also, the developer of the plugin linked in your message is Italian, so I'm wondering if they might be collaborating. And that plugin is completely different from mp3-jplayer. ( And if the new plugin is similar to the one in the link, why not just use that?)

    Just to be clear: All the correspondence I've mentioned in this thread has all been with Simon, the dev of mp3-jPlayer.

    Whoever it is, their communication skills are lacking. First they say three weeks, then a month. Oh, yeah, and: they haven't started yet.

  23. @satori83
    Posted 3 years ago #

    That was with Mark from Happyworm. I am a bit confused also as to whether they are upgrading or creating an entirely new plugin!

  24. bobk88
    Posted 3 years ago #

    Thanks for the clarification.

    Though based on jPlayer, mp3-jPlayer is completely separate - Simon made significant mods and additions when coding his plugin. So please, let's keep clear on what we're talking about in this thread! ;-)

    One final thing about jPlayer: as I mentioned above, if you need something right away, I recommend using it directly, and since you're a dev, you'd probably find re-skinning easy. I started with Happyworm's Blue Monday skin and, knowing just a little CSS, made a very different GUI (though I couldn't do the volume slider mod myself).

    I'll be interested in what Happyworm comes up with.

    Good luck!

  25. jeff8v7
    Posted 3 years ago #

    I just updated with the new release that came out yesterday.

    Everything works beautifully again!

    And, I like some of the new features too :-)

  26. bobk88
    Posted 3 years ago #


    I had to move on, but hopefully I can use 1.8 as a backup. That will involve some editing of php, javascript, and css files, since I'm using a modded version of 1.73. Or I might end up writing my own plugin...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic