-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Issue] Fixed 'Undefined class constant' error when interceptor is generated. #28981
Comments
Hi @engcom-Delta. Thank you for working on this issue.
|
✅ Confirmed by @engcom-Delta Issue Available: @engcom-Delta, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
we have the same issue. Please fix it |
Hi @m2-assistant[bot]. Thank you for your report.
The fix will be available with the upcoming 2.4.1 release. |
@magento-engcom-team why fatal error will be included only in 2.4.1 version? This is a critical error. Is any chance to include this fix into 2.4.0 version? Safe fix |
I don't understand how 2.4.0 could be released with this error in it which basically just crashes every frontend page. |
@Hexmage we have created patch - mini module to resolve this error. Maybe it will be useful for you |
@alexey-motorny-amasty: out of interest (since I saw your little |
@hostep Yes, it is compatible, but unnecessary. do not hesitate to just delete this patch |
Hi Hexmage, I have a problem with your this fix: #48 {main} [] [] |
@mdehaan not my fix contact @alexey-motorny-amasty instead. |
@mdehaan please check if you have copied all the files. or run setup:di:compile |
I just fixed it. |
This issue is automatically created based on existing pull request: #28797: Fixed 'Undefined class constant' error when interceptor is generated.
Summary (*)
static
keyword, PHP will search it within class instance.Interceptor
without access to private variables of child classes.Examples (*)
Create a plugin for
Magento\Theme\Block\Html\Title
class:Open frontend.
You'll see an error:
Proposed solution
Another way to solve this bug - is to declare constant as public instead of private.
If you think it should be public - I'll update PR.
The text was updated successfully, but these errors were encountered: