- 🇺🇸United States Digital Fire
Hi @nginex,
We are running v2.1.3 of the module are reporting the same issue. We are on Drupal 9.5.7 & PHP 8.1.12.
- 🇺🇦Ukraine nginex
I see some outdated code in CloudinaryStreamWrapper::__constructor()
I've provided a patch, let me know if it works for you
- 🇺🇸United States Digital Fire
I applied the patch and cleared all cache. Unfortunately, we are still seeing the issue.
Was there anything else I needed to do besides those steps?
- 🇺🇦Ukraine nginex
I think I do not have enough information to reproduce the bug, could you please let me know where and when exactly do you get the error? any steps to reproduce?
- 🇺🇸United States Digital Fire
When viewing "/admin/content/files" it has a hard error and the page is unusable.
When trying to create/use a content type with an image field, it has an soft error in the background that shows up in the logs.
For example; We have a basic article content type with an image field. When clicking the button that should present the media library. The ajax spinner shows up like its attempting to show but it never pops up. This is the route shown in the logs; "node/add/article?_wrapper_format=drupal_ajax&ajax_form=1"
- 🇺🇦Ukraine nginex
did you fill in API credentials here /admin/config/media/cloudinary?
I cound only reproduce the issue when I created a cloudinary image, uninstall cloudinary module, enable the module again without providing api credentials. Once I entered api credentials and saved the form the error gone
- 🇺🇸United States Digital Fire
Yes, the credentials are in place and can also be seen when checking from the cli.
- 🇧🇯Benin delacosta456
hi
i was planning to use the module but unfortunately i am also having this issue withe php8.1.18 and Drupal 9.5.9
None of the patch worked for meAny help to solve this would be welcome
Thanks
- Status changed to Needs work
12 months ago 9:29am 13 December 2023 - 🇺🇦Ukraine nginex
it appears that there are places where cloudinary api is used but cloudinary_sdk_init() is not triggered.
e.g. drush command
Need to refactor the way how and when cloudinary_sdk_init() is triggered.
- 🇮🇳India kmani
Any update on the above issue? after upgrading drupal 9.5 to Drupal 10.2.2
When viewing "/admin/content/files" it has a hard error and the page is unusable.
The website encountered an unexpected error. Try again later.
InvalidArgumentException: A path was passed when a fully qualified domain was expected. in Drupal\Component\Utility\UrlHelper::externalIsLocal() (line 305 of core/lib/Drupal/Component/Utility/UrlHelper.php).
Drupal\Core\File\FileUrlGenerator->generate('cloudinary://xxxx/images/2023/09/26/test_1695696987.jpeg') (Line: 99)
Drupal\file\Plugin\Field\FieldFormatter\BaseFieldFileFormatterBase->viewElements(Object, 'en') (Line: 89)
Drupal\Core\Field\FormatterBase->view(Object, 'en') (Line: 268)
Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple(Array) (Line: 269)
Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple(Array) (Line: 226)
Drupal\Core\Entity\Entity\EntityViewDisplay->build(Object) (Line: 460)
Drupal\Core\Entity\EntityViewBuilder->viewField(Object, Array) (Line: 243) - Assigned to klaasvw
- Status changed to Needs review
29 days ago 9:32am 5 November 2024 - 🇧🇪Belgium klaasvw
The real problem is indeed that
cloudinary_sdk_init()
is not executed if a module like dynamic_page_cache is enabled, or drush is used.There are two reasons for that:
- dynamic_page_cache has priority 27 when subscribing to KernelEvents::REQUEST, which is higher than cloudindary
- drush doesn't use the KernelEvents::REQUEST event
I'm going create an MR for 3.0.x that fixes these issues.
- Merge request !34Increase request event priority and subscribe to command event to initialize... → (Open) created by klaasvw