Grav-plugin-admin: Fetch failed and with no explanation

Created on 8 May 2017  路  14Comments  路  Source: getgrav/grav-plugin-admin

image

Using Grav v1.2.4 - Admin v1.4.2.

Everything was fine till this error occurred. For some reason I cannot see uploaded media and I cannot change title image. I see the text part fine, but media part is "empty".

question

Most helpful comment

Try increasing PHP memory limit.

All 14 comments

I can confirm this and it may well be a bug. The media was displayed fine on my installation and mod_security does not to seem at fault. After adding two images (~7mb and ~3mb, filenames are _170612-Broschuere-Oberursel-Plan2.jpg and _170612-Broschuere-Oberursel-Timing.jpg) we now get a "fetch failed" every time and no images are displayed in the page admin.

I guess it could be the filenames or filesizes that are the problem here.

The admin did upload the images fine, however, it just doesn't display them now.

Javascript console in Firefox also throws a rather cryptic error:

 at   admin.min.js:4:2712
    s https://[domain]/user/plugins/admin/themes/grav/js/admin.min.js:4:2712

which may help in tracking this down.

The filename does not seem to be the problem.

In the network panel of the Firefox console, do you see if the request to admin/media/blog.json/task:listmedia fails? And does it list any reason? (If there is no response, also try enabling "Debugger" in the system configuration)

It returns a 500 Server error.

I also tried copying the grav installation to a local server, and the media is displayed correctly on this installation.

Though I was unable to find the server error in my logs, I have to assume there must be something quirky with my setup. So this is probably not a problem with grav. Sorry, for jumping to conclusions. I will get back to you should I find out what the exact problem is.

Could be permission issues? Try turning on debugging in the Grav system config, and turn on the PHP error reporting to the maximum level, it will print an helpful error message.

Hi! i have the same issue, it's very weird, i've been posting a lot of test items into my blog and i haven't had problems, but now, everytime i try to post some item with a jpg image as media it gives me this error, i had to delete all the items and try again, then i used the same image but as png and i didn't have any problem, now i'm afraid of posting a blog item with a jpg image on it cause it causes a mess and i can't see anything in my blog listing. Please help me :(

I finally found time to take another look at this problem. It turns out, it was Issue #730.
One of our clients files was really big (9756x3508px) and increasing the php memory limit to 256 fixed the issue for this particular file.

So no fault of grav, but I do wonder though, if it could be possible to code something together, so cms functions won't automatically fail when these kind of files are uploaded. I am not sure from the original issue description when this error occurs? When accessing the file? When creating thumbnails? Maybe it is possible to check if thumbnail creation fails and in these cases to use a default thumbnail? Or just always use a default thumbnail for images larger than HD or some other arbitrary value? It just seems silly, that a large resolution image can make the whole media handling ui impossible to use.

The files attached to this were surely no bigger than 3mb.
In any case, we are passed that - reinstalled everything and have no issues anymore.

The issue seems to be the image resolution, not the actual file size. In my case, the 9756x3508 resolution image was also only 6.8mb. Of course, your issue may have been something different, but I had the same symptoms at least and increasing php memory limit fixed it.

@butscharoni It doesn't matter how small the image size is -- it takes 9756x3508x4 bytes of memory to process the image in GD library, which is 137MB. With image manipulations, the memory requirement is even larger.

Hey everyone. I experienced the same problem, getting the Fetch failed error and tried everything above. Then I noticed that in my case, i had a title "04: Wood & Interior" which uses a special tag "&". Changing my title to "04: Wood and Interior" fixed the error for me.
Hope this helps someone

Hi I ran into this issue when a client recently tried to upload images to a Grav installation using the admin panel. When the upload was finished the empty "Fetch failed:" message was displayed and the whole website rendered blank! The admin panel though was still accessible.

I figured that this issue was caused by some images with a resolution bigger than 2000px. BUT I tried it with other images which were bigger than 2000px and had a even bigger filesize and it worked without any problems. I tested different filenames on the affected images but they still don't work. The images itself are not broken or corrupt.

So right now I have 7 images that cause this issue, until I resize and export them. I really don't know what is causing it, as I tested renaming, resolution, size etc. But its a weird behavior that the whole site is rendering blank without any error or log as long as the affected module is enabled...

Try increasing PHP memory limit.

Increasing PHP memory limit worket for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Quy picture Quy  路  6Comments

illycz picture illycz  路  5Comments

jundiya picture jundiya  路  4Comments

fourroses666 picture fourroses666  路  4Comments

WilliamMiceli picture WilliamMiceli  路  4Comments