nystudio107 / craft-instantanalytics-ga4

Instant Analytics brings full Google GA4 server-side analytics support to your Twig templates and automatic Craft Commerce integration
Other
3 stars 4 forks source link

Seomatic Not Found #1

Closed darinlarimore closed 1 year ago

darinlarimore commented 1 year ago

Describe the bug

Class "nystudio107\seomatic\Seomatic" not found Getting this error traces back to https://github.com/nystudio107/craft-instantanalytics-ga4/blob/develop-v4/src/helpers/Analytics.php#L34-L36

To reproduce

Steps to reproduce the behaviour: Install plugin without SEOmatic also installed.

Expected behaviour

Should gracefully exit

I think maybe adding check for it like this or something could silence it.

if (!class_exists(Seomatic::class)) {
     return null;
 }

Screenshots

Screenshot 2023-06-07 at 5 25 01 PM Screenshot 2023-06-07 at 5 25 06 PM

Versions

khalwat commented 1 year ago

Good catch, thanks!

khalwat commented 1 year ago

Addressed in: 73792e02a03b25d4a370ba83613e613a6f7e2f49