• Resolved brianpcharles

    (@brianpcharles)


    Seeing Console error – Uncaught TypeError: Cannot read property ‘replace’ of undefined in ytprefs.min.js when trying to run a gallery. The iframe at the top of the page doesn’t have the data-ep-gallerysrc attribute. The initial video plays fine, but all the thumbnails pull up this error and do nothing. Any suggestions?

    var g = c.data("ep-gallerysrc").replace("GALLERYVIDEOID", d).

    http://www.zonediet.com/resources/dr-sears-video-interviews/

    • This topic was modified 9 years, 6 months ago by brianpcharles.
Viewing 1 replies (of 1 total)
  • Plugin Author embedplus

    (@embedplus)

    Your theme’s Javascript overrides our plugin’s attempts at using the iframe for the gallery. You have a script that revamps the entire iframe here, from line 269-296:

    http://www.zonediet.com/wp-content/themes/zonediet/js/event-tracking.js

    Are you in fact using the functionality in that section of your theme’s script? If not, you can take that section out and the gallery should work. If you actually are using it, then perhaps your theme developer can make that function a bit less aggressive. It’s currently unnecessarily deleting and recreating your iframe.

    -EmbedPlus Team

Viewing 1 replies (of 1 total)

The topic ‘Cannot read property ‘replace’ on undefined’ is closed to new replies.