NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar SharkyKZ
SharkyKZ
13 Aug 2019

Pull Request for Issue #25835.

Summary of Changes

Fixes directory tree not expanding when clicking on folder icon.

Testing Instructions

Select System > Templates > Site Templates > open Cassiopeia
Click on a folder icon

Expected result

The folder/directory tree should open.

Actual result

The tree does not open. Only if you click on the adjacent word, e.g. 'css' or 'html'.

Documentation Changes Required

No.

avatar SharkyKZ SharkyKZ - open - 13 Aug 2019
avatar SharkyKZ SharkyKZ - change - 13 Aug 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Aug 2019
Category JavaScript Repository NPM Change
avatar Quy Quy - test_item - 13 Aug 2019 - Tested successfully
avatar Quy
Quy - comment - 13 Aug 2019

I have tested this item successfully on 448ab39


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25836.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Aug 2019
avatar Scrabble96
Scrabble96 - comment - 14 Aug 2019

@Scrabble96 please test (how to: https://docs.joomla.org/Testing_Joomla!_patches)

Sorry @franz-wohlkoenig I have tried to follow those instructions (which are for staging) but when I unzipped to the bugtesting folder and tried to install Joomla I got a message about trying to do something from the Github repository. I don't work on a local machine as I can't get my head around xamps and all that stuff and uploaded and unzipped to an empty subdomain just containing the bugtesting folder which created a new subfolder called joomla-cms-4.0-dev. Please note that I am NOT a js expert by any stretch of the imagination and my resources do not extend to buying software to minify files.

I tried to find the file in the zip I downloaded from the repository, but couldn't so I attempted to change the admin-templates-default.es6.min.js manually on another installation, but I don't think I got it right.

I'm out all day today (It's just after 9am here and I should have gone by now). I'll try again tomorrow if I can get my head around it.

avatar richard67
richard67 - comment - 14 Aug 2019

@Scrabble96 Is not easy to test 4.0 if you don't have a full development environment. The "normal" document mentioned above is for staging or 3.10-dev. For 4.0-dev it needs in addition to that some software named "composer" and another one named "npm".

These specials for 4.0 are descibed here: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en.

Because this PR here changes javascript, it would need to apply the patch and then run "npm install" (or in short: "npm i").

It is not magic, but it can take a while learning it and getting used to it.

I will test this here in a few minutes, then we have 2 good tests hopefully, and this PR can get "ready to commit" (RTC), so no need for you to struggle anymore. You can still learn all that if you want, but with less time pressure because this PR will not wait for it ;-)

avatar richard67 richard67 - test_item - 14 Aug 2019 - Tested successfully
avatar richard67
richard67 - comment - 14 Aug 2019

I have tested this item successfully on 448ab39


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25836.

avatar richard67
richard67 - comment - 14 Aug 2019

I have tested this item successfully on 448ab39


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/25836.

avatar franz-wohlkoenig franz-wohlkoenig - change - 14 Aug 2019
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Aug 2019

Status "Ready To Commit".

avatar Scrabble96
Scrabble96 - comment - 15 Aug 2019

@Scrabble96 Is not easy to test 4.0 if you don't have a full development environment... For 4.0-dev it needs in addition to that some software named "composer" and another one named "npm".

These specials for 4.0 are descibed here: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en.

Because this PR here changes javascript, it would need to apply the patch and then run "npm install" (or in short: "npm i").

Thanks, @richard67
There is a link on the URL you give above to https://docs.joomla.org/Configuring_a_LAMPP_server_for_PHP_development. Unfortunately, I do not have exclusive use of a Linux server (my hosting is on a shared server) or a Linux desktop. I followed a link on that URL for 'Linux virtual machine', but that page does not exist.

Can I do the testing after setting up XAMPP on my Windows 10 desktop and saving the files into the /localhost/htdocs folder? Thanks.

avatar wilsonge
wilsonge - comment - 15 Aug 2019

Of course you can :) Our documentation on local environment setup needs some more work for Joomla 4. You need to beyond XAMPP install these two development tools for J4. Composer (used for managing all the libraries Joomla depends on) which has installation instructions here https://getcomposer.org/doc/00-intro.md#installation-windows and Node/NPM (which is used for compiling the scss and javascript). Download from here and install as a regular application

Those two tools combined with XAMPP is all you should need for Joomla 4 Development. Then as already mentioned you can follow the steps at: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en

avatar Scrabble96
Scrabble96 - comment - 15 Aug 2019

Of course you can :) Our documentation on local environment setup needs some more work for Joomla 4. You need to beyond XAMPP install these two development tools for J4. Composer (used for managing all the libraries Joomla depends on) which has installation instructions here https://getcomposer.org/doc/00-intro.md#installation-windows and Node/NPM (which is used for compiling the scss and javascript). Download from here and install as a regular application

Those two tools combined with XAMPP is all you should need for Joomla 4 Development. Then as already mentioned you can follow the steps at: https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en

Many thanks, @wilsonge I'll give it a go.

avatar wilsonge
wilsonge - comment - 15 Aug 2019

Awesome - thanks! Please ping if you have any issues :)

avatar Scrabble96
Scrabble96 - comment - 15 Aug 2019

Awesome - thanks! Please ping if you have any issues :)

Sorry, @wilsonge yes, one more: where should I download Node/NPM from? There seem to be loads of versions and there's no link in your post above. Thanks.

Edit: I've downloaded node.js from https://nodejs.org/en/ as specified in https://docs.joomla.org/J4.x:Setting_Up_Your_Local_Environment/en

avatar wilsonge
wilsonge - comment - 16 Aug 2019

?‍♂ sorry for failing to actually paste the link. you got the right thing though!

avatar Scrabble96
Scrabble96 - comment - 16 Aug 2019

Oh dear, I am trying. XAMPP, Composer and Node all installed on my 64bit laptop. Joomla all built and I am now attempting to install it. Got as far as entering username, password, database details, etc. and now the Joomla logo has been twirling around and around for the last hour. On Googling it would seem that MySQL doesn't work very well on Windows 10 Home for some reason. And I can't install it on my Desktop because that's an old, but otherwise efficient, 32bit machine and there's no 32bit version of Github Desktop! Aaargh.

avatar wilsonge
wilsonge - comment - 16 Aug 2019

That sounds odd to me. pretty sure there are people using windows 10 (@brianteeman maybe?)

avatar Scrabble96
Scrabble96 - comment - 16 Aug 2019

Well, I got there in the end. Not on my laptop, which is still trying to install Joomla 4.0 dev, but on my 32bit PC, downloading zip files from the repository instead of cloning so as I can't use GitHub desktop on this PC. Joomla was installed fairly quickly.

Next, I installed the patch testing component (3.0.0 BETA 4) and applied the patch, cleared the cache, but nothing has changed. I still can't get the directory tree to open when clicking a folder/directory icon.

I uninstalled that tester and attempted to use the stable version 2, but when I tried to use the component I got the message
An Error has occurred.
[0]Class '\PatchTester\Controller\DisplayController' not found
Return to Dashboard

I reverted back to the 3.0.0. Beta 4 version again and got the same non-result as before.

avatar richard67
richard67 - comment - 16 Aug 2019
  1. As I have mentioned in one of my previous posts, you should have run npm install after having applied the patch, because the patch changes a javascript file which then has to be copied by npm install to another location. After the npm install then you should clear browser cache because of version of copied javascript may still be cached by the browser.
  2. The patch tester stable version works only on J3. For J4 you have to use 3.0.0 beta 4.
avatar Scrabble96
Scrabble96 - comment - 16 Aug 2019

Hallelujah!

avatar richard67
richard67 - comment - 16 Aug 2019

Amen ;-)

avatar Scrabble96
Scrabble96 - comment - 16 Aug 2019

Presumably, after testing successfully and reverting the patch, I run npm install again, to go back to the original state.

avatar richard67
richard67 - comment - 16 Aug 2019

Exactly.

avatar wilsonge
wilsonge - comment - 18 Aug 2019

I won't steal anymore of this post debugging this - but would be interested to find out what the xampp issue is? because if we do have problems i'd like to try and solve them (even if that means doing stuff in Joomla)

avatar wilsonge wilsonge - change - 18 Aug 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-08-18 23:30:10
Closed_By wilsonge
Labels Added: NPM Resource Changed ? ?
avatar wilsonge wilsonge - close - 18 Aug 2019
avatar wilsonge wilsonge - merge - 18 Aug 2019
avatar wilsonge
wilsonge - comment - 18 Aug 2019

Thanks @SharkyKZ

Add a Comment

Login with GitHub to post a comment