Skip to content

Previously fixed isses with TinyMCE have not been backported in latest security patch #39628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 5 tasks
dmf-janw opened this issue Feb 14, 2025 · 9 comments
Open
1 of 5 tasks
Labels
Area: Framework Component: Tinymce Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Comments

@dmf-janw
Copy link

dmf-janw commented Feb 14, 2025

Preconditions and environment

With the downgrade from TinyMCE 7 back to version 6 a few previously fixed issues have been reintroduced. Namely #39262 and #39263.

For #39263 the relevant change done in d1b5797 is only present in the 2.4.8-beta2 release tag. In all four release tags of the latest security patch (2.4.4-p12, 2.4.5-p11, 2.4.6-p9 and 2.4.7-p4) the exclude path still refers to the now incorrect /tiny_mce/ path.

Similarly, the PR which fixes #39262 (https://github.com/magento/magento2/pull/39258/files, a71df16) is not present in any of the latest tags as well.

Steps to reproduce

The erroneous behaviour of #39263 can be reproduced by enabling production mode and javascript minification and attempting to use TinyMCE in the admin area.

#39262 is not triggered in the default configuration. The plugins are attempted to be loaded if, as described in the original issue, one has the module Magenerds_PageDesigner installed (see: Magenerds/PageDesigner#54).

Expected result

TinyMCE 6 works in the default configuration with JavaScript minification enabled and Magenerds_PageDesigner (or any other method of attempting to load the plugins in the editor) installed.

Actual result

TinyMCE6 fails to load in the aforementioned circumstances.

Additional information

This can be worked around manually.

#39263 can be fixed by adding something akin to:

    'system' => [
        'default' => [
            'dev' => [
                'js' => [
                    'minify_files' => '1',
                    'minify_exclude' => [
                        'tiny_mce_6' => '/tiny_mce_6/',
                    ]
                ],
                'css' => [
                    'minify_files' => '1',
                    'minify_exclude' => [
                        'tiny_mce_6' => '/tiny_mce_6/',
                    ]
                ]
            ]
        ]
    ]

to config.php.

#39262 can only be fixed by manually patching the contents of lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentovariable/editor_plugin.js and lib/web/mage/adminhtml/wysiwyg/tiny_mce/plugins/magentowidget/editor_plugin.js. Both paths are located in the lib directory which is supposed to be added by the installation process and not be edited manually. This introduces additional maintenance load for every installation, as the change will have to be manually carried over for each subsequent patch in which the bug is still present.

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”.
Copy link

m2-assistant bot commented Feb 14, 2025

Hi @dmf-janw. Thank you for your report.
To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.


Join Magento Community Engineering Slack and ask your questions in #github channel.
⚠️ According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 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.

@hostep
Copy link
Contributor

hostep commented Feb 17, 2025

Yeah, I noticed the same last week and brought it to the attention of the security team on Slack to try to get those fixes included in the next security releases (in April 2025), no positive feedback yet besides the fact that they told me they would consider it.

@engcom-Bravo engcom-Bravo added Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it Reported on 2.4.x Indicates original Magento version for the Issue report. labels Feb 17, 2025
@github-project-automation github-project-automation bot moved this to Ready for Confirmation in Issue Confirmation and Triage Board Feb 17, 2025
@engcom-Hotel engcom-Hotel self-assigned this Mar 11, 2025
Copy link

m2-assistant bot commented Mar 11, 2025

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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
  • 3. Add Area: XXXXX label to the ticket, indicating the functional areas it may be related to.
  • 4. Verify that the issue is reproducible on 2.4-develop branch
    Details- 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.

@engcom-Hotel
Copy link
Contributor

Thanks @dmf-janw for raising the concern!

We are confirming this issue to speed-up the things.

Thanks again.

@engcom-Hotel engcom-Hotel added Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Component: Tinymce Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Area: Framework labels Mar 11, 2025
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.adobe.com/browse/AC-14160 is successfully created for this GitHub issue.

Copy link

m2-assistant bot commented Mar 11, 2025

✅ 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.

@surajpteamwass
Copy link

@engcom-Hotel How soon will it be done?

@engcom-Hotel
Copy link
Contributor

Hello @surajpteamwass,

As I can see in its related JIRA, it has not been picked by any internal developer yet. Currently internal team is occupied in some high priority tasks. Will let you know if I got any updates.

Thanks

@surajpteamwass
Copy link

Thanks @engcom-Hotel i got an alternate solution for this problem and that is working.

'minify_exclude' => [
'tiny_mce_6' => '/tiny_mce_6/',
'tiny_mce' => '/tiny_mce/',
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Framework Component: Tinymce Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Status: Ready for Development
Development

No branches or pull requests

6 participants