ethercreative/seo

PHP Compile Error on sitemap page

joeforfuture opened this issue · 8 comments

Description

Error appears straight after installation when trying to open the "sitemap" menu in the SEO dashboard

yii\base\ErrorException: Dynamic class names are not allowed in compile-time ::class fetch in /home/url website/vendor/ether/seo/src/services/SitemapService.php:559
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

Steps to reproduce

  1. Install SEO Plugin
  2. Open "Sitemap" in plugin menu

Additional info

  • Craft version: 3.9.11
  • SEO version: 3.7.7
  • PHP version: 8.3.3

Same issue for us with Line 559 in version 3.7.7
We do not have that issue with 4.2.2 (for Craft 4)

@joeforfuture If you're able to upgrade the site, you might be able to get past that.

I think this PR tried to address it, if I am reading it right, but has been un-merged for many months. #458

Same issue when navigating directly to /sitemap.xml.

  • Craft version: 3.9.13
  • ether/seo version: 3.7.7
  • PHP version: 7.4.33
yii\base\ErrorException: Cannot use ::class with dynamic class name in /project/vendor/ether/seo/src/services/SitemapService.php:559
Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

image

Hi, we've got the same issue

Craft Pro 3.9.13
PHP version: 7.4.21
Seo: 3.7.7

Confirm that the PR #474 fixes the issue, is this or another fix going to be released soon?

@Tam Please help

We've just spotted this issue too. How am I able to utilise the fix by @cloetensbrecht in the short-term? Is that possible?

Do I change my composer.json file?

from "ether/seo": "3.7.7",
to "cloetensbrecht/seo": "??.?.?",

Sorry, not had to do this before. Any advice greatly appreciated.

I managed to get a version of #479 fix running, but it only seems to render top level sitemap.xml correctly. The child sitemaps (/sitemap_sections_1_0.xml) look broken to me (not outputting any XML markup).

When I create sitemap, am facing error https://tutivsoft.com/ Hope this is fixed :-)