Problem/Motivation

See WSOD and:

Error: Class "Drupal\simple_sitemap_engines\Form\SimpleSitemapEnginesForm" not found in Drupal\simple_sitemap_engines\Form\Handler\EntityFormHandler->settingsForm() (line 78 of /etc/apache2/htdocs/drupal-8/neway-drupal-project/web/modules/contrib/simple_sitemap/modules/simple_sitemap_engines/src/Form/Handler/EntityFormHandler.php).

Steps to reproduce

Attempt to edit any node that includes the sitemap widget

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

newaytech created an issue. See original summary.

gbyte’s picture

Category: Bug report » Support request
Priority: Major » Normal

Haven't seen it and it seems pretty unlikely. Can you tell me how to reproduce it on a new drupal instance?

Also when creating bug reports, always test the dev version. Releases cannot be changed anymore so they are irrelevant. Changing to support request for the time being.

newaytech’s picture

Thanks for checking in here and for the work on the module.

I managed to get the basic functionality of the site back by uninstalling the base app - and then re-installing - which meant I had to re-configure the inclusion of the content types - all good thus far.

The only part that is now throwing an error is the settings page in the /admin/config/search/simplesitemap/engines/settings page - the Search engines > Settings part:

InvalidArgumentException: Class "\Drupal\simple_sitemap_engines\Form\SimpleSitemapEnginesForm" does not exist. in Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (line 37 of /etc/apache2/htdocs/drupal-8/neway-drupal-project/web/core/lib/Drupal/Core/DependencyInjection/ClassResolver.php).

I thought I'd found the issue with a naming mismatch of the case of s in SimpleSitemapEnginesForm filename - but I've changed that and still no joy.

Strangely - it works on Windows dev, but not on Ubuntu...

I've disabled the "Simple XML Sitemap (Search engines)" module for now...

gbyte’s picture

Can you check if this could be relevant to your issue (see last few comments)?

#3228147: Class 'Drupal\simple_sitemap\Queue\SimpleSitemapQueue' not found

newaytech’s picture

Am pleased to say issue is now fixed; following a file rename:

\modules\contrib\simple_sitemap\modules\simple_sitemap_engines\src\Form\SimpleSitemapEnginesForm.php

A composer remove / re-install identified the file.

Thanks for your help.

gbyte’s picture

Status: Active » Fixed

Glad it worked.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

gbyte’s picture

jbd44’s picture

I had the same issue. I decided to roll back to version 4.2.2. It resolved the error.

gbyte’s picture

I had the same issue. I decided to roll back to version 4.2.2. It resolved the error.

That's not a good strategy though, as you probably don't want to be stuck on this version forever.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

acvellio’s picture

@jbd44

Just for reference, I'm reporting this. My remote environment is Acquia Cloud.

I was able to fix the issue by following the steps in the comment below, running git config --global core.ignorecase false in my local environment, and then pushing again.

https://www.drupal.org/project/simple_sitemap/issues/3228147#comment-143...

jcl324’s picture

Everyone has been dancing around the real issue here (#3 "Strangely - it works on Windows dev, but not on Ubuntu...") and #12 proposes a fix. What happened to me was that I was on 4.2.2, did my normal monthly updates in Dec and 4.2.3 was updated. Everything was fine (on my local Mac) until I deployed to an Ubuntu production server. Boom, fatal error as mentioned in this issue. What the real issue was that on the server, SimpleSitemapEnginesForm.php was showing in the file system as SimplesitemapEnginesForm.php! A simple lower case "s" was the hole issue. Renaming it with "S" fixed the error. And what a mess to reconcile in git between the server and my local lol.

And I see in #12 that there was a similar issue 4 years(!) ago with camel case naming.

I just downloaded the source code from https://git.drupalcode.org/project/simple_sitemap/-/tags (4.2.3), unzipped it and the filename is correct. Also tested uploading to the server in case my Mac was lying to me and it was fine there too.

So no idea what happened before with a simple composer update for core and all my modules.

yousefanbar’s picture

Issue not resolved! Can anyone help?

gbyte’s picture

@yousefanbar

Please read the above comments. This module won't fix this issue for you. You need to tell git not to ignore letter case or manually rename the problematic file from Simplesitemap to SimpleSitemap.