? Pending

User tests: Successful: Unsuccessful:

avatar infograf768
infograf768
20 May 2020

Summary of Changes

As title says
$folder is a full path and can't be compared to folder names in the pregmatch.

Testing Instructions

Create a field anywhere in a core config.xml
Example

		<field
			name="installation"
			type="folderlist"
			label="COM_LOCALISE_LABEL_INSTALLATION_FOLDER"
			description="COM_LOCALISE_LABEL_INSTALLATION_FOLDER_DESC"
			hide_default="true"
			default="installation"
			exclude="administrator|api|build|components|cache|images|includes|language|libraries|logs|media|modules|node_modules|plugins|templates|test|tmp|bin|cli|layouts" />

That field should display in a dropdown all folders which are not excluded.
For example, when testing on 4.0-dev and if one keeps the installation folder, it will let select the installation folder.

Before patch

No folder displays in dropdown.

After patch

Folders not in the list in exclude are displayed.

NOTE

The existing code works fine in staging/3.10-dev
Therefore something has broken it. As I could not find what, I corrected the file.

@SharkyKZ
As you worked on that file, you may know if there is another solution.

avatar infograf768 infograf768 - open - 20 May 2020
avatar infograf768 infograf768 - change - 20 May 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 20 May 2020
Category Libraries
avatar SharkyKZ
SharkyKZ - comment - 20 May 2020

There's already similar PR for staging #22032. Can you test that and see if it fixes your issue?

The existing code works fine in staging/3.10-dev

Can you double check that.

avatar infograf768
infograf768 - comment - 20 May 2020

Can you double check that.

I did and it works fine without any change.

Screen Shot 2020-05-20 at 10 38 25

The older PR #22032 uses a none supported exclude formatting as example.
exclude="^[Aa]dministrator$|^[Cc]ache$|^[Cc]omponents$|^[Cc]li$|^[Ii]ncludes$|^[Ll]anguage$|^[Ll]ibraries$|^[Ll]ogs$|^[Mm]odules$|^[Pp]lugins$|^[Tt]emplates$|^[Xx]mlrpc$" />

Also, the user defines a totally different issue: for him it displays all root folders, which I can't reproduce at all.

The PR is indeed similar but I don't see it use in the 3.x series.

avatar SharkyKZ
SharkyKZ - comment - 20 May 2020

The example in other PR is valid regex and is supported. The fix is the same as well.

I can't reproduce your issue but it could occur if your Joomla installation has path containing one of the excluded strings. E.g. C:/joomla-test/, it would get excluded because of |test|.

Anyways, if this is the correct fix, it should be fixed in staging first.

avatar infograf768
infograf768 - comment - 20 May 2020

arggh
|test| instead of |tests|

But I indeed tested the code used in the other PR with the regex and it solves his issue.
Let's get that one in.

avatar infograf768
infograf768 - comment - 20 May 2020

Closing this as #22032 is now merged anyway

avatar infograf768 infograf768 - change - 20 May 2020
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2020-05-20 09:15:29
Closed_By infograf768
Labels Added: ?
avatar infograf768 infograf768 - close - 20 May 2020

Add a Comment

Login with GitHub to post a comment