wp-parsely icon indicating copy to clipboard operation
wp-parsely copied to clipboard

PHP fatal error occurs when AMP is enabled

Open acicovic opened this issue 1 year ago • 2 comments

Describe the bug

We've got a couple of reports of a PHP fatal error occurring when AMP is enabled. Here are the reported error messages:

PHP message: PHP Fatal error: Uncaught TypeError: Parsely\Scripts::script_loader_tag(): Argument #1 ($tag) must be of type string, null given, called in wp-includes/class-wp-hook.php on line 307 and defined in wp-parsely-3.5/src/class-scripts.php:138
PHP message: PHP Fatal error: Uncaught TypeError: Parsely\Scripts::script_loader_tag(): Argument #1 ($tag) must be of type string, null given, called in wp-includes/class-wp-hook.php on line 307 and defined in wp-parsely-3.8/src/class-scripts.php:145

The first error refers to an old wp-parsely version, and is probably the same as the second error.

To Reproduce

We'll try to reproduce this when we work on fixing it. Apparently, installing the AMP plugin should result in the error.

Expected behavior

We should not have a fatal error.

acicovic avatar Jul 24 '23 09:07 acicovic

In my tests, just installing and activating the AMP plugin doesn't surface a fatal error for me.

acicovic avatar Aug 16 '23 15:08 acicovic

Information from @thompsonjoshua that may come in handy:

Most recently, a customer said that the error went away when they disabled javascript tracking in wp-parsely.

acicovic avatar Aug 18 '23 15:08 acicovic

Just to get back to this, I recently worked with the AMP plugin and noticed no issues. @thompsonjoshua, do you remember having any newer reports regarding this?

I'm thinking of closing this issue because it resembles to be more of a temporary hiccup? Also, plugin versions are old (3.5 and 3.8).

acicovic avatar Oct 15 '24 11:10 acicovic

No, I haven't received any reports on this lately. I'm okay with closing this out.

thompsonjoshua avatar Oct 16 '24 13:10 thompsonjoshua