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

Fix #29879 Breadcrump Undefined class constant 'XML_PATH_CATEGORY_URL_SUFFIX' #29925

Conversation

toxix
Copy link
Member

@toxix toxix commented Sep 7, 2020

When creating a plugin, that is calling the public functions for the
product breadcrump they ending up throwing an error message, because
this constants has been marked as private recently.

This is fixing it with referencing to the current instance and all is
working again. This fix is analog to another bug of the same type:

#28981
#28797

This should resolve:
Resolves #29879

…ORY_URL_SUFFIX'

When creating a plugin, that is calling the public functions for the
product breadcrump they ending up throwing an error message, because
this constants has been marked as private recently.

This is fixing it with referencing to the current instance and all is
working again. This fix is analog to another bug of the same type:

magento#28981
magento#28797

This should resolve:
magento#29879
@m2-assistant
Copy link

m2-assistant bot commented Sep 7, 2020

Hi @toxix. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ 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

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests 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 Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@ihor-sviziev ihor-sviziev self-assigned this Sep 7, 2020
@ihor-sviziev ihor-sviziev added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Sep 7, 2020
@ihor-sviziev
Copy link
Contributor

@magento run all tests

@ihor-sviziev
Copy link
Contributor

Hi @toxix ,
Do you think it’s possible to cover with some static test? Will you be able to do that?

@BarnyShergold BarnyShergold self-assigned this Sep 7, 2020
@ihor-sviziev
Copy link
Contributor

From fire look - looks good, but there were some failing tests, I just restarted them to make sure these failures not related

@ihor-sviziev ihor-sviziev added the Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. label Sep 8, 2020
Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

✔ Approved.

Failing tests looks not related to changes form this PR.

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-8157 has been created to process this Pull Request

@mrtuvn
Copy link
Contributor

mrtuvn commented Sep 8, 2020

I have got same issue in 2.4.0 when view product details page
Good fix

@toxix
Copy link
Member Author

toxix commented Sep 8, 2020

Hey @ihor-sviziev ,

Sry not really familiar with the testing framework and busy with daily work. Feel free to add Test yourself, as tests are good thing.

@sidolov sidolov added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Sep 8, 2020
@engcom-Delta engcom-Delta self-assigned this Sep 9, 2020
@engcom-Delta
Copy link
Contributor

✔️ QA passed
Result:
❌ Before:
Error in log Error: Undefined class constant 'XML_PATH_CATEGORY_URL_SUFFIX' in /var/www/html/magento2dev/app/code/Magento/Catalog/ViewModel/Product/Breadcrumbs.php:74
Screenshot from 2020-09-09 12-48-33

✔️ After:
No errors when plugin is called
image

@engcom-Delta
Copy link
Contributor

Note: Functional Tests B2B are failed

@m2-assistant
Copy link

m2-assistant bot commented Sep 10, 2020

Hi @toxix, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@toxix
Copy link
Member Author

toxix commented Sep 16, 2020

@ihor-sviziev thanks for taking care of the failing tests and pushing this pr forward. <3

What I don't get, is why this is not included in magento 4.2.1 release? There is still some time and it is reasonable marked as S2/P2. I was also wondering this with several other patches, that has been merged to dev branch. Still I needed to apply them manually.

@ihor-sviziev
Copy link
Contributor

@sidolov is it possible to add this fix to 2.4.1?

@sidolov
Copy link
Contributor

sidolov commented Sep 16, 2020

@ihor-sviziev unfortunately, the scope of 2.4.1 is defined and only release blockers can be delivered. This fix will be available in 2.4.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: Catalog Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept Release Line: 2.4 Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Late Static Binding on private constants in Magento\Catalog\ViewModel\Product\Breadcrumbs
8 participants