I have a similar error:
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: No route found for "GET /visitors/_track": Method Not Allowed (Allow: POST) in Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (regel 140 van /<path to vendor folder>/vendor/symfony/http-kernel/EventListener/RouterListener.php).
The location generates a "error in client application" message.
I recreated the 'Authenticated user' role on my testserver (via the UI) and the problem indeed looks to be gone. WIll tomorrow do the same on the production server.
Many thanks for helping me with this strange problem.
I only have 2 system roles: (admin and anonymous) and 1 user-defined role "bestuurslid" (= board member).
I certainly have not intentionally removed the "authenticated user" role, but some Googling learned me that it may happen by removing a module.
But so far, Google could not tell me how to restore a system role (apart from digging directly in the database?). This problem is lingering around for quite some time here, so recent backups will not be very helpfulβ¦
My test server has the same problem. It was loaded with a production image with the backup_migrate module.
BTW: there is also another problem that may be related to the above: I cannot assign a role to an existing account. I get a message "Illegal choice authenticated in Rollen element.". Assigning a role when creating an account does work.
How to reproduce:
1. Allow anonymous visitor to "see comments"
2. Create a blog with "open for comments"
3. Add (and approve) a comment
4. Anonymous visitor tries to read the Blog => gets a white screen, with an error message (see above) at the top.
The error does not show up when:
- anonymous visitor is disallowed to "see comments"; or
- blog has no comments.
softpol β created an issue.
The patch works for me, but all directories are created with mod = 777, while the original mod was (in my case) 755.
Systeemnaam: backup_migrate
Versie: 5.0.3
BTW: this fix now exists for almost 2 years and is still not merged into an update of the module?
Noβ¦
I created the sandbox https://master-gahutiy2psj6zbxspb1qabbkeov4rt0c.tugboatqa.com.
Then added some taxonomy terms (Auteur, Jaargang and Categorie) and a content type "Jaarboekartikel" with 6 fields (Auteur, Jaargang, Categorie, Nabeschouwing, PDF and Reactie).
Then created /node/1 with that content type. Uploaded a PDF file "Onbeschikbaar.pdf".
Logged out and accessed the page as unregistered user. This succeeds on this sandbox, but on my production site, I get a
"The website encountered an unexpected error. Please try again later.
Error: Call to a member function hasPermission() on null in Drupal\comment\CommentManager->forbiddenMessage() (line 160 of core/modules/comment/src/CommentManager.php)."
Main parameters of the website:
- Drupal-versie: 9.5.11
- Webserver: Apache/2.4.56 (Debian)
- Database versie: 10.5.21-MariaDB-0+deb11u1
- PHP versie: 8.1.21
Steps to produce the problem:
1. create a content type
2. Add a number of fields (e.g. of type "entity reference", text, file) to the content type
[so far, so good: all pages of that content type can be visited by an unregistered user]
3. add a field of type "comments" [not sure if this is the correct english field type name, as I translated it from Dutch - the machine name is field_blog_comments]
[an unregistered vistor now gets a blank screen with the message:
The website encountered an unexpected error. Please try again later.
Error: Call to a member function hasPermission() on null in Drupal\comment\CommentManager->forbiddenMessage() (line 160 of core/modules/comment/src/CommentManager.php).
]
softpol β created an issue.
I normally clear cache and update DB from the admin UI. This is not possible after upgrade to Components! 3.0.0-beta3, because the website is broken. So, I did the DB update with drush, but I got no system prompt back after 3 updates (and killed the proces with :
pi@pi3:/var/www/pi3.softpol.net $ vendor/bin/drush updatedb
------------ ---------------- ------------- ---------------------------------
Module Update ID Type Description
------------ ---------------- ------------- ---------------------------------
components components_reg post-update Clear caches to allow
istry_cache_pa components.registry service to
ths cache template paths.
components components_reg post-update Clear caches to load new
istry_service components.registry service.
components components_twi post-update Clear caches to load updated
g_loader_servi components.twig.loader service.
ce
------------ ---------------- ------------- ---------------------------------
Do you wish to run the specified pending updates? (yes/no) [yes]:
>
> [notice] Update started: components_post_update_components_registry_cache_paths
> [notice] Update completed: components_post_update_components_registry_cache_paths
> [notice] Update started: components_post_update_components_registry_service
> [notice] Update completed: components_post_update_components_registry_service
> [notice] Update started: components_post_update_components_twig_loader_service
> [notice] Update completed: components_post_update_components_twig_loader_service
^C
I then did a clear cache with drush:
pi@pi3:/var/www/pi3.softpol.net $ vendor/bin/drush cache-rebuild
[success] Cache rebuild complete.
and retried the DB update. AFter a long wait, I got a bunch of error messages, ending with:
PHP Fatal error: Uncaught Symfony\Component\Routing\Exception\RouteNotFoundException: Route "" does not exist. in /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Routing/RouteProvider.php:206
Stack trace:
#0 /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Routing/UrlGenerator.php(432): Drupal\Core\Routing\RouteProvider->getRouteByName()
#1 /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Routing/UrlGenerator.php(270): Drupal\Core\Routing\UrlGenerator->getRoute()
#2 /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php(105): Drupal\Core\Routing\UrlGenerator->generateFromRoute()
#3 /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Url.php(765): Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute()
#4 /var/www/pi3.softpol.net/web/modules/contrib/visitors/src/EventSubscriber/KernelTerminateSubscriber.php(152): Drupal\Core\Url->toString()
#5 [internal function]: Drupal\visitors\EventSubscriber\KernelTerminateSubscriber->onTerminate()
#6 /var/www/pi3.softpol.net/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(142): call_user_func()
#7 /var/www/pi3.softpol.net/vendor/symfony/http-kernel/HttpKernel.php(103): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#8 /var/www/pi3.softpol.net/vendor/stack/builder/src/Stack/StackedHttpKernel.php(32): Symfony\Component\HttpKernel\HttpKernel->terminate()
#9 /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/DrupalKernel.php(702): Stack\StackedHttpKernel->terminate()
#10 /var/www/pi3.softpol.net/vendor/drush/drush/src/Boot/DrupalBoot8.php(310): Drupal\Core\DrupalKernel->terminate()
#11 [internal function]: Drush\Boot\DrupalBoot8->terminate()
#12 {main}
thrown in /var/www/pi3.softpol.net/web/core/lib/Drupal/Core/Routing/RouteProvider.php on line 206
But eventually the website was again upβ¦
I don't know if I applied the right commands, or in the right order. It would be good to add some additional instructions to the upgrade procedure.
softpol β created an issue.