Failed to load file [2019-09/CF_128x128_1], [Resource not found - 2019-09/CF_128x128_1].

Failed to get sub-folders under folder [2019-09/CF_128x128_1], [Can't find folder with path 2019-09/CF_128x128_1].

InvalidArgumentException: The URI '' is invalid. You must use a valid URI scheme. in Drupal\Core\Url::fromUri() (line 281 of D:\xampp\htdocs\drupal8local\web\core\lib\Drupal\Core\Url.php).

I am seeing above errors in Log Messages, when I upload the Image to cloudinary

Comments

sreenivasparuchuri created an issue. See original summary.

estrejlau’s picture

I'm seeing this as well, and need to add that the image is uploaded to Cloudinary, but does not show up in the database as having been associated with the node or entity on the given field.

naveenvalecha’s picture

Priority: Major » Normal
Status: Active » Closed (duplicate)

Seems like this is a duplicate of #3016606: Cannot upload image to cloudinary
Edit: Sam pointed that this is not a duplicate. So reopening it

naveenvalecha’s picture

Status: Closed (duplicate) » Active
jlongbottom’s picture

StatusFileSize
new319.05 KB

This module is broken and totally unusable due to this issue. Not sure what is unique about my system that is causing the issue, because I find it hard to believe they cut this alpha release without testing it. Seems related to subfolders.

Uploading a single image results in all these errors in the logs:

jlongbottom’s picture

The issue looks to be related to the AJAX behaviour of the Image widget on the field. It fails when trying to render the thumbnail after auto-uploading. If I disable AJAX on the field and submit the form the old-fashioned way, it seems to work for me.

jlongbottom’s picture

The Image field widget auto-uploads on file selection and then generates a thumbnail and link. It is the link generation that causes the exception.

Commenting out this line in file.module fixes it for me, but its not a real or permanent solution.

$variables['link'] = \Drupal::l($link_text, Url::fromUri($url, $options));
briangonzalezmia’s picture

I get the same error and the workaround in #7 still throws the same errors plus `This value should be of the correct primitive type.` That blocks saving the node. Any other ideas to fix the stream??

dorficus’s picture

This is also broken on 8.8.0-alpha1. I am able to get the file to upload, but on the Drupal side there are issues and the media entity does not save as an entity.

I get the same laundry list of errors as in #5, but when i visit cloudinary the image is there waiting for me. I'll try to spend some time debugging this and see if I can get a patch together, but I don't know how much time I have to dedicate to this today.

hizbul25’s picture

I am suffering with the same issue. I followed #7 process and the found the issue as #8. Anybody found any workaround?

impol’s picture

The issue is reproducing when you have wrong cloudinary credentials or file in cloudinary already deleted, but exists in some field.
Here is a patch, which forces to output URL to file.

impol’s picture

Also you must enable 'auto create directories' option under Cloudinary account, maybe it will help to resolve

Failed to get sub-folders under folder [2019-09/CF_128x128_1], [Can't find folder with path 2019-09/CF_128x128_1].

impol’s picture

StatusFileSize
new1.08 KB

Fix namespace

impol’s picture

StatusFileSize
new1.13 KB

New fix

impol’s picture

StatusFileSize
new1.13 KB

Fixed namespace

er11’s picture

This fix doesn't work
This bug needs to be re-opened

naveenvalecha’s picture

Version: 8.x-1.0-alpha1 » 8.x-1.x-dev
damondt’s picture

This error can also happen due to this issue: https://www.drupal.org/project/cloudinary/issues/3171412