magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Category description WYSIWYG is empty on non default storeview #38622

Closed thlassche closed 5 months ago

thlassche commented 6 months ago

Preconditions and environment

Steps to reproduce

  1. Edit category in the backend on storeview level
  2. Untick the box 'Use default value' next to the category description field WYSWYG editor
  3. Enter a description in the WYSIWYG editor
  4. Save

Expected result

Description is saved and shown in the edit form

Actual result

WYSIWYG editor is empty after load

Additional information

This is due to a change in dom-observer.js in https://github.com/magento/magento2/commit/5b931fec7dedb343a303bef40ec47c4b5f58859f

The return here now exits the loop early, which wasn't the case before, since it was inside a _ function before: https://github.com/magento/magento2/commit/5b931fec7dedb343a303bef40ec47c4b5f58859f#diff-844cfb7b272693bacaa64be3a0fd96a543cc145b478330777c39682cc15b5961R152

Patch that fixes the issue:

Index: src/vendor/magento/module-ui/view/base/web/js/lib/view/utils/dom-observer.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/view/base/web/js/lib/view/utils/dom-observer.js b/view/base/web/js/lib/view/utils/dom-observer.js
--- a/view/base/web/js/lib/view/utils/dom-observer.js   
+++ b/view/base/web/js/lib/view/utils/dom-observer.js   (date 1713248057631)
@@ -149,7 +149,7 @@
         _.each(watchers.selectors, function (listeners, selector) {
             for (let data of listeners) {
                 if (!data.ctx.contains(node) || !$(node, data.ctx).is(selector)) {
-                    break;
+                    continue;
                 }

                 if (data.type === 'add') {

Release note

No response

Triage and priority

m2-assistant[bot] commented 6 months ago

Hi @thlassche. 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. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

thlassche commented 6 months ago

Pull request: https://github.com/magento/magento2/pull/38623

m2-assistant[bot] commented 6 months ago

Hi @engcom-Bravo. 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:

engcom-Bravo commented 6 months ago

Hi @thlassche,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible.Kindly refer the attached screenshots.

Steps to reproduce

Screenshot 2024-04-17 at 09 56 03

WYSIWYG editor is empty after load.

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 6 months ago

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

m2-assistant[bot] commented 6 months ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.