Open edward-simpson opened 2 years ago
Hi @edward-simpson. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.Issue: Clear Description
label to the issue by yourself.Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.hi @edward-simpson , We have tried to reproduce the issue in Magento 2.4-develop branch the issue is not reproducible. Please refer the below screenshot for the reference;
We have followed the below steps in order to reproduce the issue: 1.Create media folder ending in hyphen 2.Create module and config.xml file to add this folder to WYSIWYG folder list 3.Navigate to admin panel cms block or page, and try to add image from this folder
Let us know in case we have missed anything.
Thanks
@engcom-Dash thanks for taking a look, it seems like your replication steps haven't quite matched my issue - the hyphened folder is in the pub root, so, e.g.
/var/html/www/pub/-Retail-/
And appear under the storage root as such:
@magento give me 2.4-develop instance
Hi @engcom-Dash. Thank you for your request. I'm working on Magento instance for you.
Hi @engcom-Dash, here is your Magento Instance: https://189ccb8ce4ff34b4058278913678ea10.instances.magento-community.engineering Admin access: https://189ccb8ce4ff34b4058278913678ea10.instances.magento-community.engineering/admin_8c8a Login: 4032af83 Password: 8fdbf788a298
Hi @engcom-Dash ,
Were you able to replicate this? I appreciate it's not a huge issue for new builds, but I've currently got a client who's now unable to access lots of files in their media folder through the admin panel after an 2.3.4 -> 2.4.3 upgrade
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
[ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).Details
If the issue has a valid description, the label Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.
[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.4-develop
branchDetails
- Add the comment @magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
[ ] 5. Add label Issue: Confirmed
once verification is complete.
[ ] 6. Make sure that automatic system confirms that report has been added to the backlog.
Hello @edward-simpson,
Thanks for the report and collaboration!
We have tried to reproduce the issue on Magento 2.4-develop branch and the issue is reproducible when we use the image folder name with hyphen(-). Please refer to the below screenshot for reference:
But without hyphen(-), we can see and select the images from that folder:
Hence confirming the issue.
Thanks
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-5901 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.magento.com/browse/AC-5901
For anyone else having the issue this patch will solve it, but as I'm unable to guess at the original intention, I can't say whether it will cause any side effects or cause security issues!
diff --git i/Model/Wysiwyg/Images/Storage.php w/Model/Wysiwyg/Images/Storage.php
index 388d0b097..6dd5a04b4 100644
--- i/Model/Wysiwyg/Images/Storage.php
+++ w/Model/Wysiwyg/Images/Storage.php
@@ -1001,7 +1001,7 @@ class Storage extends \Magento\Framework\DataObject
$or = '';
foreach($mediaGalleryImageFolders as $folder) {
$folderPattern = str_replace('/', '[\/]+', $folder);
- $regExp .= $or . $folderPattern . '\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$';
+ $regExp .= $or . $folderPattern . '(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$';
$or = '|';
}
$regExp .= ')/';
Hello @edward-simpson,
As the issue is quite old, we tried to reproduce this in 2.4-develop, and the issue is still reproducible. Please take a look at the screenshot below:
folder without hyphen
folder with hyphen
Hence reconfirming this.
Thank you.
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-5901
Preconditions and environment
Steps to reproduce
Expected result
Images contained in folder display in media gallery to be added into page
Actual result
"No files found" message is displayed
Additional information
This seems to be because of the
\b
regexp added at the end of the folder path, which stops -test- matching (removing this while testing on regex101.com then matches against the folder name e.g.-test-\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$
from the full pattern:
^(wysiwyg\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$|-test-\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$|Spec_Sheets\b(?!-)(?:\/?[a-zA-Z0-9\-\_]+)*\/?$)
Release note
No response
Triage and priority