Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting the "data-buttonid" attribute breaks JS when used in WordPress #172

Open
chemiker opened this issue Jul 15, 2019 · 1 comment · May be fixed by #198
Open

Setting the "data-buttonid" attribute breaks JS when used in WordPress #172

chemiker opened this issue Jul 15, 2019 · 1 comment · May be fixed by #198

Comments

@chemiker
Copy link
Member

When setting the "data-buttonid" within WordPress the button rendering fails and throws the following error:

Uncaught TypeError: $ is not a function at t.iframe (app.js:5) at t.renderButtonIframe (app.js:5) at t.init (app.js:5) at t.extractPodcastDataFromJson (app.js:5) at t.getPodcastData (app.js:5) at new t (app.js:5) at HTMLDocument.t.init (app.js:5)

Seems like this is related to the usage of "$" in

$(".podlove-subscribe-button-#{@options.buttonId}").on 'click', (event) =>

The issue does not appear when leaving "data-buttonid"away or empty.

chemiker pushed a commit to podlove/podlove-subscribe-button-wp-plugin that referenced this issue Jul 20, 2019
* Fixed an issue that prevented the subscribe button to appear (related to podlove/podlove-subscribe-button#172)
* Fixed a XSS vulnerability
* Bump copyright year
* Prevent a PHP notice to be displayed when a button without a feed is displayed
@drallgood
Copy link

I have the same issue. Simple reason being that JQuery is not a dependency.

@drallgood drallgood linked a pull request Mar 22, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants