- Issue created by @brentg
- @brentg opened merge request.
- Status changed to Needs review
about 1 year ago 8:41am 4 October 2023 - 🇧🇪Belgium al0a
Created a patch, with another approach: We shouldn't check on the view mode, since this can be anything. It also supports multiple entities.
- 🇧🇪Belgium daften
I tried to reproduce this problem using the steps from the description, but couldn't do that. Maybe the link being shown is already prevented by another contrib module on the project I tested it on or the behaviour changed in Drupal core.
The patch looks good, but without a means to reproduce it, I can't merge it in.
- Status changed to Needs work
4 months ago 8:50am 7 August 2024 - 🇧🇪Belgium kevinvb
Tested the patch because without it the functionality of this module will prevent being able to index content in the following case:
- Have a multilingual website
- Make sure the full content is being index in you search api index
- Index content while in eg. English
If you have content in Dutch but it isn't translated to English the module will throw a 404 because it checks on the view mode and it uses the current language (EN) which makes it impossible to index the content in your search index.
Using the patch, not the MR, on Drupal 10.3 it makes indexing the content possible because it doesn't intervene anymore.I would however advise to make the patch and MR similar. And instead of combining variables into checking the routeName it would be better to use:
$entity->toUrl()->getRouteName()