Skip to content
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

Multiple HTML attributes not editable on Categories #38843

Closed
1 of 5 tasks
adamlavery opened this issue Jun 19, 2024 · 28 comments
Closed
1 of 5 tasks

Multiple HTML attributes not editable on Categories #38843

adamlavery opened this issue Jun 19, 2024 · 28 comments
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.7 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

@adamlavery
Copy link

adamlavery commented Jun 19, 2024

Preconditions and environment

CE 2.4.7

Needs a custom category text attribute to be added that uses the WYSIWYG editor. See the web for example of how to do that.

This arose after upgrading from 2.4.3 to 2.4.7. Upgrade went through 2.4.4, 2.4.5 & 2.4.6 so no idea what version this bug appeared in.

Steps to reproduce

  1. Add a custom text category attribute e.g. https://developer.adobe.com/commerce/frontend-core/ui-components/howto/add-category-attribute/

  2. Add to the category edit page as wysiwyg i.e.

        <field name="custom_description" template="ui/form/field" sortOrder="100" formElement="wysiwyg">
            <argument name="data" xsi:type="array">
                <item name="config" xsi:type="array">
                    <item name="wysiwygConfigData" xsi:type="array">
                        <item name="height" xsi:type="string">100px</item>
                        <item name="add_variables" xsi:type="boolean">false</item>
                        <item name="add_widgets" xsi:type="boolean">false</item>
                        <item name="add_images" xsi:type="boolean">true</item>
                        <item name="add_directives" xsi:type="boolean">true</item>
                    </item>
                    <item name="source" xsi:type="string">category</item>
                </item>
            </argument>
            <settings>
                <label translate="true">Below Description</label>
                <dataScope>custom_description</dataScope>
            </settings>
            <formElements>
                <wysiwyg class="Magento\Catalog\Ui\Component\Category\Form\Element\Wysiwyg">
                    <settings>
                        <rows>8</rows>
                        <wysiwyg>true</wysiwyg>
                    </settings>
                </wysiwyg>
            </formElements>
        </field>

  1. Try to edit the field on the category - it won't save. Note in our case our custom fields already have values that display on the frontend but do not show on the backend. Changes do not save,

  2. Change the sort order of the field to 49 and try again., This time you can edit and save the custom attribute but not the normal Description field.

  3. Change the sort order back to 100 and make the field a basic textarea field e.g.

<field name="custom_description" sortOrder="100" formElement="textarea">
    <settings>
        <dataType>string</dataType>
        <label translate="true">My Text Attribute</label>
    </settings>
</field>

Now you can edit and save the field as text.

Expected result

We are able to edit all HTML fields on the category page.,

Actual result

We can only edit the first HTML field that appears on the category page.

Additional information

Custom attribute editor empty:
image

Move custom attribute before core description, now description empty:
image

Make custom attribute a standard textarea and works ok:
image

Release note

Fix bug introduced in 2.4.? that prevents editing of additional custom HTML attributes on categories.

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 Jun 19, 2024

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


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.

@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.7 Indicates original Magento version for the Issue report. labels Jun 19, 2024
@adamlavery
Copy link
Author

@magento give me 2.4-develop instance

Copy link

Hi @adamlavery. Thank you for your request. I'm working on Magento instance for you.

Copy link

@adamlavery
Copy link
Author

How do we get SSH access to this to be able to add a test module?

@engcom-Hotel engcom-Hotel removed the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Jun 21, 2024
@engcom-Dash engcom-Dash self-assigned this Jun 21, 2024
Copy link

m2-assistant bot commented Jun 21, 2024

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

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

@engcom-Dash engcom-Dash removed their assignment Jun 27, 2024
@engcom-Delta engcom-Delta self-assigned this Jun 28, 2024
Copy link

m2-assistant bot commented Jun 28, 2024

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

@GamesmenJordan
Copy link

+1 to this issue.

@engcom-Hotel engcom-Hotel added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Jul 3, 2024
@engcom-Delta engcom-Delta removed their assignment Jul 3, 2024
@engcom-Hotel engcom-Hotel self-assigned this Jul 8, 2024
Copy link

m2-assistant bot commented Jul 8, 2024

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

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Jul 8, 2024

Hello @adamlavery,

Thanks for the report and collaboration!

We have tried to reproduce the issue by upgrading the Magento from 2.4.3 to 2.4.7-p1 (The latest released version). But it seems the issue is not reproducible for us. After upgrading we can see the saved value from the previous version i.e. 2.4.3.

Please refer to the below screenshot for reference:

image

We are also attaching the module we have created to reproduce the issue:
Magentoissues.zip

Let us know in case we missed anything.

Thanks

@engcom-Hotel engcom-Hotel added Issue: needs update Additional information is require, waiting for response and removed Issue: ready for confirmation labels Jul 8, 2024
@adamlavery
Copy link
Author

@engcom-Hotel this really doesn't demonstrate the issue. Try moving your custom attribute into Content and display after the core Description field (i.e. sortOrder 51+). As per this test, your custom attribute is the first HTML field on the page and that works. I suspect if you open Content you'll find you can't change Description. But do as we have done to exactly reproduce our scenario.

@engcom-Hotel
Copy link
Contributor

Hello @adamlavery,

Thanks for the response.

As per your response, we have made the required changes in the module and have moved the custom category attribute to Display Settings. However, we still cannot reproduce the issue.

We followed the entire upgrade process from 2.4.3 to 2.4.7-p1. Please refer to the screenshot below for reference:

image

Let us know if we have missed anything.

Thanks

@adamlavery
Copy link
Author

Hi @engcom-Hotel , ok so this time you have put it in the Display Settings section. Put it in the Content section, below Description as per the screenshots.

@skovalenk
Copy link
Contributor

Adobe broke it when was fixing static tests.
image

Long story short:
This is the fix. Just replace for...var cycle to .forEach cycle in domObserver:processAdded function back.
image

It is a shame guys, that you are saying that you could not even reproduce it. it is 100% reproducible everywhere

@engcom-Hotel
Copy link
Contributor

Hello @adamlavery, @skovalenk,

It is a shame guys, that you are saying that you could not even reproduce it. it is 100% reproducible everywhere

I apologize but we are trying our best in this issue reproduction.

We have tried again and now the custom field is in the Content section below the description field. Please refer to the screenshot below for reference:

image

But the issue is not reproducible for us. Just so you know, we are attaching the module as well, please let us know if we missed anything.

Magentoissues.zip

Thanks

@engcom-Hotel engcom-Hotel added Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Area: Catalog labels Jul 11, 2024
@github-jira-sync-bot
Copy link

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

Copy link

m2-assistant bot commented Jul 11, 2024

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

@hostep
Copy link
Contributor

hostep commented Jul 11, 2024

I have the feeling this might have already been fixed in 2.4-develop with #38623, but I might be wrong.

@engcom-Hotel: did you only test it while upgrading Magento to 2.4.7, or did you then also test it by further upgrading to the latest 2.4-develop version?

@adamlavery
Copy link
Author

I can confirm that this commit fixes the issue: 1933e66

@hostep
Copy link
Contributor

hostep commented Jul 11, 2024

Okay perfect, then I guess we can close this issue, the fix is probably scheduled to be delivered in Magento 2.4.8

@engcom-Hotel
Copy link
Contributor

I have the feeling this might have already been fixed in 2.4-develop with #38623, but I might be wrong.

@engcom-Hotel: did you only test it while upgrading Magento to 2.4.7, or did you then also test it by further upgrading to the latest 2.4-develop version?

Hello @hostep,

We have tried it in both 2.4-develop (the latest development branch) and via upgrading. The issue is not reproducible in 2.4-develop but it is reproducible in upgrading from 2.4.3 to 2.4.7-p1 (the latest released version).

So as per my suggestion, the issue should remain open, for upgrading scenario.

Thanks

@adamlavery
Copy link
Author

@hostep - agreed! This has nothing to do with upgrading from one release to another. It's a coding error introduced by #37477.

Is it not considered serious enough to go in the next patch release? How can we know which release includes it?

@hostep
Copy link
Contributor

hostep commented Jul 17, 2024

@engcom-Hotel: ticket can be closed in my opinion, it's a bug in the code that has introduced the problem, not the upgrade process itself. The reason why it's not reproducible in 2.4-develop is because the fix was already introduced in 2.4-develop on 28 May 2024

@adamlavery: I assume this fix will get included in Magento 2.4.8 and not in one of the security patch releases. I don't think Adobe considers it as highly critical.

Just patch your codebase to fix the bug if you need it urgently, using one of the well known composer patch libraries (https://github.com/vaimo/composer-patches or https://github.com/cweagans/composer-patches/ or ...).

@engcom-Hotel
Copy link
Contributor

Sure @hostep. We are closing the issue.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Catalog Component: Catalog Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: done Reported on 2.4.7 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
Development

No branches or pull requests

9 participants