-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Class 'Drupal\bootstrap\Bootstrap' not found error #69
Comments
Thanks for the D.o issue references but you can explain the steps to reproduce this problem by using the Swagger UI FF module? |
Steps might be the following
Error: Class 'Drupal\bootstrap\Bootstrap' not found in As a solution:
Option 1 as for me looks more promising. |
I guess this is their dirty trick which is not working in all cases... |
The problem is still reproducible. Main root cause, that the registration the namespaces of installed themes is separately from registration a list of namespaces with PSR-4 directories from container.namespaces. There is a drupal.org issue on this problem. Therefore, while there are no fixes in the core about this problem, the attached patch can be applied: |
Thanks @alenastanul87 for the detailed root cause analyzes. However, I am still hasitant to commit any changes related to this issue to the module if only Bootstrap based themes are affected. Currently, we are not aware of any other way to trigger this error... Being that said:
|
Thanks @mxr576 for your comment. Firstly, I compared the page load speed with the code Secondly, the problem exists until now. We are facing it. But the work on the drupal.org issue has been going on since 2018. Looking optimistically it will ever be completed. But we don't know the date yet. Thirdly, considering your comments I propose another version of the patch: |
Quick answer before I leave for the weekend :) Could you please create a PR instead of sharing suggestions in patches? thank you |
I noticed this error after upgrading to version 3 (3.2 to be specific). Although the problem is ultimately a core issue, it is more frequently evident since swagger_ui_formatter now calls
loadActiveTheme()
around line 111 ofSwaggerUiLibraryDiscovery.php
. The issue has been reported in drupal.org/i/2667062 and in drupal.org/i/2853398. There was a suggestion that it happens if "rebuild theme" is checked in devel, but I have noticed it even with that option unchecked. I am wondering if anyone has a suggestion for a workaround.The text was updated successfully, but these errors were encountered: