J4 Issue ?
avatar infograf768
infograf768
10 Dec 2018

Steps to reproduce the issue

As title says.
URL is
/administrator/index.php?option=com_media&path=local-0:/

Expected result

Same as when debug is disabled:

screen shot 2018-12-10 at 09 28 58

Actual result

screen shot 2018-12-10 at 09 29 49

Additional comments

Some errors in Console:
SyntaxError: import declarations may only appear at top level of a module mediamanager.js:1
on Firefox.
or similar
SyntaxError: Unexpected identifier 'Vue'. import call expects exactly one argument.
on Safari.

Source map error: request failed with status 404
Resource URL: http://localhost:8888/installmulti/joomla40/media/vendor/metismenujs/js/metismenujs.js?c71e83b4299e53b9e9f2cbc41461860a
Source Map URL: metismenujs.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: http://localhost:8888/installmulti/joomla40/media/vendor/css-vars-ponyfill/js/css-vars-ponyfill.js?1.15.1
Source Map URL: css-vars-ponyfill.js.map[Learn More]
Source map error: request failed with status 404
Resource URL: http://localhost:8888/installmulti/joomla40/media/vendor/bootstrap/js/bootstrap.bundle.js?4.1.3
Source Map URL: bootstrap.bundle.js.map[Learn More]

These .map files are present on my test site.

avatar infograf768 infograf768 - open - 10 Dec 2018
avatar joomla-cms-bot joomla-cms-bot - change - 10 Dec 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 10 Dec 2018
avatar infograf768 infograf768 - change - 10 Dec 2018
Labels Added: J4 Issue
avatar infograf768 infograf768 - labeled - 10 Dec 2018
avatar Quy
Quy - comment - 11 Dec 2018

I am not able to reproduce with the nightly build of Tuesday, 11 December 2018 03:00:37 UTC.

avatar infograf768
infograf768 - comment - 12 Dec 2018

OK. I found the issue. We may still have a bug. I explain.

I had a mediamanager.js file in .../media/com_media/js/mediamanager.js dated october 2018.
After using npm ci on that existing site, that file was kept there.
That file was an exact copy of /administrator/components/com_media/resources/scripts/mediamanager.js

In a new clean install, this file IS NOT created in the media folder and all works well because, when debug is on, only the mediamanager.min.js is created and used as we have no mediamanager.js to use.

Should that file be created as other js are is the question.
Before closing, need explanations.

@dgrammatiko ?

avatar dgrammatiko
dgrammatiko - comment - 12 Dec 2018

The debugging for a vue application, media manager, is way deferent than the plain old imperative scripts. There shouldn’t be an unminified file imho

avatar laoneo
laoneo - comment - 12 Dec 2018

@dgrammatiko is right, we don't have a none minified file, because it is a vue application which compiles the JS file out of the .vue files.

avatar dgrammatiko
dgrammatiko - comment - 12 Dec 2018

FYI Joomla should drop the non minified files as also the rest of the files (I mean the es6 DOM related scripts) need some sort of transpiling. Also for anyone that wants to contribute there is a watch option in the npm command that recompiles on every file change. The uncompressed files are useless...

avatar mbabker
mbabker - comment - 12 Dec 2018

The uncompressed files are useless...

When working against the core repository, sure. Remember, debug mode is available on production sites and away from the Git repository and having non minified files can help in tracing/debugging an issue in a website (which may lead back to a core issue). So the use and support for non minified files needs to keep being a consideration (especially as given the current structure the source ES6 files are not shipped with production builds).

avatar infograf768
infograf768 - comment - 12 Dec 2018

Closing but not convinced as, indeed, no way for testers to debug. Looks like it will be more and more a matter of specialists.

avatar infograf768 infograf768 - close - 12 Dec 2018
avatar infograf768 infograf768 - change - 12 Dec 2018
Status New Closed
Closed_Date 0000-00-00 00:00:00 2018-12-12 19:42:19
Closed_By infograf768

Add a Comment

Login with GitHub to post a comment