Skip to content

Conversation

@in-session
Copy link
Contributor

@in-session in-session commented Mar 7, 2025

@m2-assistant
Copy link

m2-assistant bot commented Mar 7, 2025

Hi @in-session. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@in-session
Copy link
Contributor Author

@magento run all tests

@in-session
Copy link
Contributor Author

in-session commented Mar 7, 2025

Static test will be fixed after test run:

<!--
/**
 * Copyright 2014 Adobe
 * All Rights Reserved.
 */
-->

PHP Code Sniffer detected 1 violation(s): FILE: /var/www/html/app/code/Magento/Catalog/etc/adminhtml/system.xml -------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------- | WARNING | Copyright is missing or Copyright content/year is not valid -------------------------------------------------------------------------- FILE: /var/www/html/app/code/Magento/Catalog/etc/config.xml -------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------- | WARNING | Copyright is missing or Copyright content/year is not valid -------------------------------------------------------------------------- Failed asserting that 1 matches expected 0.

1
PHP Code Sniffer detected 2 violation(s): FILE: /var/www/html/app/code/Magento/Catalog/Helper/Product/View.php -------------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES -------------------------------------------------------------------------- 179 | WARNING | [x] Whitespace found at end of line 184 | WARNING | [x] Whitespace found at end of line 193 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters 213 | WARNING | [ ] Line exceeds 120 characters; contains 122 characters -------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------- Failed asserting that 2 matches expected 0.

Semantic Version Checker because of XML changes:

System changes (MINOR) | FailureDetailsLevelTarget/LocationCode/ReasonMINORdev/layout_settings/enable_id_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0M302 A field-node was addedMINORdev/layout_settings/enable_attribute_set_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0M302 A field-node was added | Level | Target/Location | Code/Reason | MINOR | dev/layout_settings/enable_id_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0 | M302 A field-node was added | MINOR | dev/layout_settings/enable_attribute_set_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0 | M302 A field-node was added -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --

MINOR | dev/layout_settings/enable_id_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0 | M302 A field-node was added
MINOR | dev/layout_settings/enable_attribute_set_handle/app/code/Magento/Catalog/etc/adminhtml/system.xml:0 | M302 A field-node was added

@in-session
Copy link
Contributor Author

@magento run all tests

@in-session
Copy link
Contributor Author

@magento run all tests

@in-session
Copy link
Contributor Author

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE

@in-session in-session marked this pull request as ready for review March 9, 2025 16:06
@engcom-Charlie engcom-Charlie added feature request Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Triage: Need PO Confirmation Requirements should be clarified/approved/confirmed with Product Manager. Not ready for fix/delivery labels Mar 10, 2025
@github-project-automation github-project-automation bot moved this to Pending Review in Pull Requests Dashboard Mar 10, 2025
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2025 Adobe
* All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These copyrights are incorrect and were reverted previously. They are gone in 2.4.8-beta and 2.4.8-develop, but still present in 2.4.7-develop (on which this PR is branched).
Maybe @sidolov you can double check whether this propietary copyright notice does not end up in an actual release?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be nice if there was a clear statement about which copyright to use. My last status was the changes in the PR.
2.4.8-beta2: https://github.com/magento/magento2/blob/2.4.8-beta2/app/code/Magento/Catalog/etc/di.xml#L2

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct format should be:

/**
 * Copyright [first year code created] Adobe
 * All rights reserved.
 */

Source: https://developer.adobe.com/commerce/contributor/guides/code-contributions/backward-compatibility-policy/#adding-a-constructor-parameter

So the year 2025 should be replaced with 2013 over here.

Same remark around the other files changed in this PR, please don't use the year 2025 unless it's a new file.

@wigman: is this what you were after? Or did I misunderstood?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hostep no, that was not wat I was after :) the copyright notice is not supposed to change to "all rights reserved", unless the decision to roll that change back has been reversed, and I need to check with Adobe core team if that can be prevented.

Copy link
Contributor

@hostep hostep Mar 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it changes from * Copyright © Magento, Inc. All rights reserved. to Copyright 2013 Adobe * All Rights Reserved.

All rights reserved has always been there as far as I know (example from 10 years ago). It's just that it was previously 'Magento', then 'Magento, Inc', which may no longer exist, and is now 'Adobe'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, you are completely right. I misread. It thought it was a partial return of these changes, which were quite severe 😅 24ce222 thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. You may be interested in magento/magento-coding-standard#492 then.

@engcom-Charlie
Copy link
Contributor

We have raised approval JIRA for the SVC failure. Once we receive all the approvals, we will continue working on this PR. Till then moving it to Pending Approval.

image

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Sep 18, 2025

Hi @in-session,

Thank you for this contribution!

While going through the PR and testing activity, we have found out that the path you have set in app/code/Magento/Catalog/etc/config.xml is different than what you are fetching in view file and that’s the reason, after taking the PR changes, the functionality didn’t work. We have updated the path in DB and evaluated the PR, hence kindly do the needful.

Following the SVC approval mentioned here, we received some feedback. Could you please address the following too?

  • What is the purpose of adding product id handle in this PR. Kindly remove the same. The PR will be moved to ‘Changes Requested’ until the modification is completed.

@engcom-Charlie engcom-Charlie moved this from Pending Approval to Changes Requested in Community Dashboard Sep 18, 2025
@in-session
Copy link
Contributor Author

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@in-session as mentioned here, can you please remove the product id handle from this PR in order to proceed ahead with it.

@engcom-Charlie
Copy link
Contributor

@in-session as mentioned here, can you please remove the product id handle from this PR in order to proceed ahead with it.

Hi @in-session, are you working on these suggested changes or should I proceed to implement it.

@in-session
Copy link
Contributor Author

@engcom-Charlie Thank you for the feedback. I want to add a final clarification to ensure we are aligned on the goal of this PR.

The main purpose of this contribution is to make the product ID handle configurable, allowing merchants to disable it for a significant performance improvement.

With that in mind, does your request "remove the product id handle" mean:

  1. I should set the handle to be disabled by default (e.g., <enable_id_handle>0</enable_id_handle>), so we can ship this performance gain to all users out-of-the-box, while keeping it configurable for those who need it?
  2. Or should I remove the configuration feature entirely? This would mean the handle remains non-configurable and always active, which would defeat the original performance goal of this PR.

I am ready to proceed with option 1 as it aligns with the goal, but I wanted to confirm with you first. Thank you!

@in-session
Copy link
Contributor Author

@magento run all tests

@engcom-Charlie
Copy link
Contributor

  1. enable_id_handle

Hi @in-session, thank you for the reply.

The attribute_set layout handle was introduced in PR #36244. As a follow-up, this functionality should now be made configurable.

This PR should focus on making the attribute_set handle configurable via system settings. We request the removal of any additional configuration related to the product_id handle, as it is no longer necessary.

@in-session
Copy link
Contributor Author

@engcom-Charlie Thank you for clarifying. I will update the PR to focus only on the attribute_set handle as requested.

To ensure I fully understand the context for the future, I'd like to ask for a quick clarification on your comment that the product_id handle configuration is "no longer necessary"?

From my perspective, the catalog_product_view_id_X handle is still a widely-used core feature, which is why I thought making it configurable would be a valuable addition.

Did you mean it is "no longer necessary" within the specific scope of this PR, or is there a larger technical context or upcoming change that makes this configuration obsolete that I should be aware of?

This information would be very helpful. I am proceeding with the requested code changes now.

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Oct 8, 2025

@engcom-Charlie Thank you for clarifying. I will update the PR to focus only on the attribute_set handle as requested.

To ensure I fully understand the context for the future, I'd like to ask for a quick clarification on your comment that the product_id handle configuration is "no longer necessary"?

From my perspective, the catalog_product_view_id_X handle is still a widely-used core feature, which is why I thought making it configurable would be a valuable addition.

Did you mean it is "no longer necessary" within the specific scope of this PR, or is there a larger technical context or upcoming change that makes this configuration obsolete that I should be aware of?

This information would be very helpful. I am proceeding with the requested code changes now.

Hi @in-session, Thank you for your response and for considering the input.

I have reviewed the changes in this PR, as well as from 36244

I have discussed the point you raised in comment with the internal team, and it has been agreed that we can proceed with option #1, keeping the product_id handle with disabled by default (ie. <enable_id_handle>0</enable_id_handle>in this PR.

Kindly make according change so that, we can reach out for the approvals further.

@in-session
Copy link
Contributor Author

@engcom-Charlie That is fantastic news! Thank you very much to you and the internal team for taking the time to discuss this and for agreeing to include the full feature. I truly appreciate the reconsideration and I am happy to proceed.

Before I commit the final change, I want to raise one critical point regarding the default value to ensure we make the best decision for the entire Magento community.

Setting the default to <enable_id_handle>0</enable_id_handle> will introduce a backward compatibility breaking change. Merchants who upgrade and currently rely on catalog_product_view_id_X.xml layouts will have their customizations silently fail. This can be very frustrating and difficult for them to debug.

The standard best practice to avoid this is to:

  1. Keep the default 1 (enabled) in minor versions to ensure backward compatibility.
  2. Change the default to 0 (disabled) in the next major version (e.g., 2.4.9), where breaking changes are expected and announced.

I am ready to implement whatever the team decides. If you are comfortable with this breaking change now, I will set the default to 0. I just felt it was my responsibility to ensure you were all fully aware of the potential impact on existing users.

Please let me know your final decision.

@engcom-Charlie
Copy link
Contributor

Hi @in-session,

Thank you for highlighting the potential impact of changing the default value. That’s a very valid point.
We are currently discussing this internally and we’ll get back to you soon with our final stance on the default value. Till then moving this PR to On Hold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: on hold Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it

Projects

Status: On Hold

Development

Successfully merging this pull request may close these issues.

[Issue] Product layout based on attribute_set (PR #36244)

7 participants