Skip to content

Unable to see content in Media folder ending in hyphen #35630

@edward-simpson

Description

@edward-simpson

Preconditions and environment

  • M2.4.3-p1

Steps to reproduce

  1. Create media folder ending in hyphen (e.g. pub/media/-test-), add images into this folder
  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

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

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: FrameworkComponent: MediaGalleryIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: ready for devReported on 2.4.3-p1Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchTriage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions