luke-nehemedia / craft-emailobfuscator

A simple email obfuscate plugin (using rot13) for CraftCMS3
MIT License
3 stars 1 forks source link

ReferenceError: Can't find variable: Rot13 (Edit: making InludeJS available as project.yaml setting) #4

Closed kaspar-allenbach closed 5 years ago

kaspar-allenbach commented 5 years ago

I have a weird behaviour.

The obsfucated mail shows. But then suddenly this error appears in the console and the E-Mail adress is no longer shown:

ReferenceError: Can't find variable: Rot13

The markup then renders like this:

<a
href="https://wetterfroscher.meteotest.review/buchen">registrieren Sie sich hier</a>. Die Registrierung dauert nur wenige Augenblicke.</p><p>Für Fragen und Anregungen schreiben Sie an folgende Adresse:<script type="text/javascript">Rot13.write('<n uers="znvygb:xbagnxg@jrggresebfpure.pu"> xbagnxg(ng)jrggresebfpure.pu</n>');</script><noscript><span
style="unicode-bidi:bidi-override;direction:rtl;">hc.rehcsorfrettew)ta(tkatnok < hc.rehcsorfrettew@tkatnok > </span></noscript></p></div></div></div><a
href="#mobileMenu" class="mmenuToggle"></a>

As you can see there is no longer a clickable part in the markup.

What to do about this???

kaspar-allenbach commented 5 years ago

Further investigation. I tought it might be a scriptblocker like uBlock Origin. But it happens on FF, Chrome & Safari without any extensions activated

https://wetterfroscher.meteotest.review/kontakt

luke-nehemedia commented 5 years ago

Hello

For some reason, the script file is not included in your site.

Is the option "InludeJS" enabled in the settings? With this setting enabled, the plugin should register the file in the <head> tag of your site.

kaspar-allenbach commented 5 years ago

Yep. That's the problem.

I use project.yaml to sync the cms structure. Therfore I have 'allowAdminChanges' => false, set on my LIVE system.

The downside is that I can't activate the EmailObfuscator on my LIVE system :( Is it possible to write the lightswitch status into the project.yaml for a next version?

luke-nehemedia commented 5 years ago

I will definitely consider it, however, not in the next couple of weeks, since this is a free plugin and I deploy it in my free time.

However, implementing support for project config seems reasonable, but involves quite some changes and testing. Therefore I am not able to do it short-term right now.

kaspar-allenbach commented 5 years ago

No hurry. It's a free plugin after all.

Besser den Sommer geniessen ☀️

kaspar-allenbach commented 5 years ago

hmm. nope, the lightswitch is activated. Still does not include the script