Problem/Motivation
I am experiencing an unexpected error that does not seem to be caused by any local module and/or configuration. I'm not sure if it is a Webform issue or a Pathauto issue. The error (that does not appear in the logs) reads:
Cannot redeclare Drupal\pathauto\AliasCleaner::$punctuationCharacters in /var/www/html/web/modules/contrib/pathauto/src/AliasCleaner.php on line 85
Because I'm working on a new project, I'm using the latest and greatest (which might or might not be relevant) :
Drupal 10.1.5
PHP 8.2.11
Webform 6.2.0-rc3
Pathauto 1.12.0
Honeypot 2.1.3 (enabled for all webforms)
Steps to reproduce
To reproduce:
- Create/Open a Drupal website that matches the above versions and packages.
- Make sure you are logged in as a user that is allowed to add/edit webforms
- Navigate to the Webforms overview page (/admin/structure/webform)
- Open the developers console of your browser (F12 in Chrome, CMD + opt + I on Safari, right-click: Inspect element and switch to Console tab)
- Enter a (unique) title for the new webform. As soon as you click the save-button, the above error appears in the console.
- If you refresh the page afterwards, you will see the Webform overview will include the newly created form.
Or, if you have an existing webform:
- Try to submit the webform. Submitting the webform will show an all-white error page, only including the error mentioned above.
The error is present on both a local dockerized environment, as on a (pre)-production environment running the same release / versions.