AMP Cache plugin - Use of undefined constant WP_ROCKET_PLUGIN_NAME
When the AMP Cache plugin is used, the following PHP warning appears in the debug.log:
PHP Warning: Use of undefined constant WP_ROCKET_PLUGIN_NAME - assumed 'WP_ROCKET_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in /home/example/wp-content/plugins/wp-rocket/inc/classes/Buffer/class-cache.php on line 461
To Reproduce
Steps to reproduce the behavior:
- Install the AMP Cache, a premium plugin. It requires the AMPforWP plugin.
- Enable WordPress's debugging.
- Visit a page on mobile.
- An error similar to the one at the beginning will be there.
Expected behavior
PHP warnings should not be there in the debug.log.
Additional context
Related ticket: https://secure.helpscout.net/conversation/1227324822/180698?folderId=2135277
Backlog Grooming (for WP Media dev team use only)
- [ ] Reproduce the problem
- [ ] Identify the root cause
- [ ] Scope a solution
- [ ] Estimate the effort
@vmanthos Do you have the AMP Cache plugin by any chance? Please add it to our shared resources folder if you have it for our Dev and QA teams.
Any update ? Just sent one licence by email for you to work on this matter.
Similar error reported here: https://secure.helpscout.net/conversation/1271931182/191823/
@arunbasillal The customer contacted us again and has provided the AMP Cache plugin - I've uploaded it to the shared folder
@arunbasillal @Tabrisrp The customer has conveyed a message from the developer of the AMP for WP plugin: « Can you please ask the WP Rocket team to register on our website so that our billing team can grant them access? »
"on our website" = https://ampforwp.com/
Le mar. 27 oct. 2020 à 22:34, Lucy Beer [email protected] a écrit :
@arunbasillal https://github.com/arunbasillal @Tabrisrp https://github.com/Tabrisrp The customer has conveyed a message from the developer of the AMP for WP plugin: « Can you please ask the WP Rocket team to register on our website so that our billing team can grant them access? »
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/wp-media/wp-rocket/issues/2907#issuecomment-717553682, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKT3NT5CQ7WCGN2FW7ZB25TSM44GTANCNFSM4PDQOT5A .
Related ticket: https://secure.helpscout.net/conversation/1342899496/213779
Related ticket - https://secure.helpscout.net/conversation/1381827422/227364/
Related ticket: https://secure.helpscout.net/conversation/1473743512/253065/
related ticket: https://secure.helpscout.net/conversation/1491585921/258217?folderId=4130695
Related ticket - https://secure.helpscout.net/conversation/1531002809/268535/
Related ticket: https://secure.helpscout.net/conversation/1604165193/288117/
Related: https://secure.helpscout.net/conversation/1721692155/313429/
Related - https://secure.helpscout.net/conversation/1934829956/351249/
Related: https://secure.helpscout.net/conversation/1943075369/354543?folderId=3864740
Related: https://secure.helpscout.net/conversation/2685394870/508540?folderId=8127822
In @Adrianadla's ticket above and this new one: https://secure.helpscout.net/conversation/2697446897/510592?folderId=377611 This has escalated from a PHP warning to a Fatal Error.
Related: https://secure.helpscout.net/conversation/2786591392/529377