Taxonomy Term access is not checked on overridden route

Created on 27 March 2018, over 6 years ago
Updated 18 March 2024, 3 months ago

I have the following case:
1. Taxonomy Views block is used for a vocabulary.
2. A custom module is implementing hook_ENTITY_TYPE_access for taxonomy terms.
In cases when when term page is not accessible TaxonomyViewsIntegratorTermPageController trys to render selected taxonomy views but instead NULL is returned and an exception is thrown:
The controller must return a response (null given). Did you forget to add a return statement somewhere in your controller? in Symfony\Component\HttpKernel\HttpKernel->handleRaw() (line 169 of /var/www/vendor/symfony/http-kernel/HttpKernel.php).

Correct result: 403 page.

Proposed solution:
There should be added a requirement _entity_access to the overridden route in RouteSubscriber.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡²πŸ‡©Moldova andreyjan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024