Hello,
Updating to the latest version and having multiple sub-websites. The main website has no problem but all the subsites encounter the following error:
TypeError: Argument 2 passed to Drupal\jsonapi\Routing\Routes::Drupal\jsonapi\Routing\{closure}() must be an instance of Drupal\jsonapi\ResourceType\ResourceType, null given in Drupal\jsonapi\Routing\Routes::Drupal\jsonapi\Routing\{closure}() (line 330 of modules/contrib/jsonapi/src/Routing/Routes.php).
I have tried to manually rebuild the `router.builder` in the subsites but it didn't help. Besides, I have checked other jsonapi versions and noticed that the problem doesn't exist in the version 1.0.
Looking into the issue list, I have found this issue very similar to this one. I followed the related issues and found out this one and finally this one. However, apparently I was wrong and the last issue was not really related to this one. Therefore, dear Wim Leers asked me to open a new issue.
So, I hope the given information is useful for solving this issue. Thank you very much for your support and for maintaining this awesome module.
Sincerely yours,
Ramin
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 3003552-5-debug-do-not-test.patch | 1.48 KB | wim leers |
Comments
Comment #2
hedeshy commentedComment #3
hedeshy commentedComment #4
hedeshy commentedComment #5
wim leersCan you apply the attached debug patch and try again? That will add some useful debug output that'll help us pinpoint the root cause. Thanks!
Comment #6
hedeshy commentedHi Wim,
Thank you very much for following up this issue. When I was patching the module I have noticed that `Schemata` module has also a route class. I assumed it can potentially cause this issue so I removed it but it didn't fix the problem.
Well, here is what I get from the debug patch you have sent me. Hope it helps.
Comment #7
wim leersAt the end there is this:
This means that there's something off/wrong about the
field_publikation_fileentity reference field. Can you inspect its configuration and verify that it is correct? I think it's probably referring to a wrong or non-existent entity type or bundle.Comment #8
hedeshy commentedThanks a lot, Wim!
Yes, the file type was not selected in that field though it is required. So, I am sorry for wasting your precious time. Hopefully, this post can at least help other people who have the same issue.