Parsely / wp-parsely

The official WordPress plugin for Parse.ly - makes it a snap to add the required tracking code to enable Parse.ly on your WordPress site.
https://wordpress.org/plugins/wp-parsely/
GNU General Public License v2.0
64 stars 32 forks source link

PHP fatal error occurs when AMP is enabled #1742

Closed acicovic closed 2 weeks ago

acicovic commented 1 year ago

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 commented 1 year ago

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

acicovic commented 1 year ago

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 commented 3 weeks ago

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).

thompsonjoshua commented 2 weeks ago

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