?
avatar Scrabble96
Scrabble96
12 Jan 2019

Steps to reproduce the issue

Analyse website with Yellow Lab Tools
Note that two Javascript files with a total of eight errors are listed:

Expected result

No Javascript errors

Actual result

/media/vendor/webcomponentsjs/js/webcomponents-sd-ce-pf.min.js "ReferenceError: Can't find variable: Set"
plus
seven "TypeError: Type error" /media/vendor/joomla-custom-elements/js/joomla-alert-es5.min.js the first one being toString() and the next u()
Of course, being in the min file they are all in line one line so I haven't a hope of tracking the errors down myself. Renaming the min file I thought might force it to use the non-min file so I could track the errors down, but it doesn't, it just throws a 404 error.

System information (as much as possible)

Joomla! 4.0.0-alpha7-dev (11/12 January) on CloudAccess.net

Additional comments

This may all just be a false positive. If that's the case I'll just close it. I have no expertise in Javascript (yet) so I can't suggest any alterations

avatar Scrabble96 Scrabble96 - open - 12 Jan 2019
avatar joomla-cms-bot joomla-cms-bot - change - 12 Jan 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Jan 2019
avatar dgrammatiko
dgrammatiko - comment - 12 Jan 2019

@Scrabble96 which browser?

avatar dgrammatiko
dgrammatiko - comment - 12 Jan 2019

That tool you used is relying on PhantomJS. I'm not sure if PhantomJS supports webcomponents or if the polyfill (most of the errors come from there) is not compatible with PhantomJS...

avatar Scrabble96
Scrabble96 - comment - 12 Jan 2019

@dgrammatiko
Thank you. I tried using both Firefox and Chrome. Same result, but, as you say, it might be an issue with PhantomJS.

But would that explain the 'errors' it found in joomla-alert-es5.min.js as well?

avatar SharkyKZ
SharkyKZ - comment - 12 Jan 2019

Of course, being in the min file they are all in line one line so I haven't a hope of tracking the errors down myself.

Enable debug to load non-minified files.

avatar dgrammatiko
dgrammatiko - comment - 12 Jan 2019

@Scrabble96 so here is the deal:

  • The errors from /media/vendor/webcomponentsjs/js/webcomponents-sd-ce-pf.min.js refer to a script we are depending from Google. This is the polyfill for the webcomponents for the browsers that don't support that technology natively. Safari, Firefox, Chrome, Opera, Samsung, Brave and every other browser based on Chromium are already natively supporting Web Components. The only ones that don't are IE11 and Edge (edge soon will also use Chromium so...). That said the problem I see is the PhantomJS or the tool that you used to get the analysis. FWIW the polyfill is already tested against all Joomla supported browsers.

  • The errors from the alert.js. So that script is part of another repo https://github.com/joomla-projects/custom-elements (docs: https://joomla-projects.github.io/custom-elements/#/) and up till sometime ago it had automated tests against all Joomla 4 supported browsers. FWIW that repo is under heavy refactoring atm but before any new code is published we need to fix all the Custom Elements in this repo. Unfortunately this is a task for me so things progressing slowly because I have limited spare time...

All and all I'll say ignore this tool's errors...

avatar Scrabble96
Scrabble96 - comment - 12 Jan 2019

@dgrammatiko
Thank you, and sorry to take up so much of your precious time.

I will do as you say, ignore it and will now close this issue.

avatar Scrabble96 Scrabble96 - change - 12 Jan 2019
Status New Closed
Closed_Date 0000-00-00 00:00:00 2019-01-12 17:31:32
Closed_By Scrabble96
avatar Scrabble96 Scrabble96 - close - 12 Jan 2019

Add a Comment

Login with GitHub to post a comment