Become a Patron button

First up I contacted Patreon’s customer service team about my problem, but they said they are no longer able to provide Patreon developer support for their WordPress plugin and API. Thus, I’m hoping someone here might be able to point me in the right direction.

The issue I’m having concerns the ‘Become a Patron’ widget button. Up until very recently the widget was working fine but now fails to render correctly. According to the browser error console:

becomePatronButton.bundle.js:1 Uncaught SyntaxError: Invalid or unexpected token

It doesn’t appear to be a plugin or theme conflict as I haven’t changed anything in that regard. Nor a caching issue - I currently run WP Rocket. The strange part is when logged into my WordPress account the widget works fine so it isn’t a typo, or a missing "> the issue is only on the public side.

If anyone knows what the cause might be or has a solution, I would be most grateful :blush:

I think you are using a Javascript widget that is no longer supported. Installing the below free plugin may provide you that widget’s functionality and more.

Codebard thank you for your reply.

I finally found a solution to the problem so sharing this in case it helps out others facing the same predicament.

As I mentioned the Become a Patron widget button works fine when logged into the WordPress dashboard. This means that the becomePatronButton.bundle.js is in fact cached. So when I check the page without being logged in there is a JS error. By simply excluding becomePatronButton.bundle.js from caching was the answer. I could do this inside WP Rocket settings under “Excluded JavaScript Files”.

1 Like