User tests: Successful: Unsuccessful:
As title says
$folder
is a full path and can't be compared to folder names in the pregmatch.
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.
No folder displays in dropdown.
Folders not in the list in exclude
are displayed.
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.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Can you double check that.
I did and it works fine without any change.
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.
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.
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.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-05-20 09:15:29 |
Closed_By | ⇒ | infograf768 | |
Labels |
Added:
?
|
There's already similar PR for staging #22032. Can you test that and see if it fixes your issue?
Can you double check that.