seo icon indicating copy to clipboard operation
seo copied to clipboard

PHP Compile Error on sitemap page

Open joeforfuture opened this issue 11 months ago • 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

joeforfuture avatar Mar 11 '24 16:03 joeforfuture

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. https://github.com/ethercreative/seo/pull/458

maxfenton avatar Mar 19 '24 00:03 maxfenton

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

cloetensbrecht avatar Apr 10 '24 12:04 cloetensbrecht

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?

anchovy avatar Jun 04 '24 01:06 anchovy

@Tam Please help

maxfenton avatar Jun 04 '24 12:06 maxfenton

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

garycrane avatar Jun 04 '24 12:06 garycrane

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.

garycrane avatar Jun 04 '24 12:06 garycrane

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

garycrane avatar Jun 05 '24 15:06 garycrane

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

student-programmer-6565 avatar Jun 10 '24 21:06 student-programmer-6565