Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Compile Error on sitemap page #470

Open
joeforfuture opened this issue Mar 11, 2024 · 9 comments
Open

PHP Compile Error on sitemap page #470

joeforfuture opened this issue Mar 11, 2024 · 9 comments

Comments

@joeforfuture
Copy link

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
@maxfenton
Copy link

maxfenton commented Mar 19, 2024

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

@cloetensbrecht
Copy link

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 added a commit to cloetensbrecht/seo that referenced this issue Apr 10, 2024
@anchovy
Copy link

anchovy commented Jun 4, 2024

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?

@maxfenton
Copy link

@Tam Please help

@garycrane
Copy link

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
Copy link

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
Copy link

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

@student-programmer-6565

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

@diegocosta-dev
Copy link

Hi, I got the same issue

Craft Pro 3.9.13
PHP version: 7.4.33
Seo: 3.7.7

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants