Tried to upload PDF, now entire site is down: An image could not be created from the given input
Permalink
So I just built a site in 5.8. Everything was going fine. Then I tried to upload a PDF file. I have uploaded images with no problem. Now I get this message:
An image could not be created from the given input
But, it's not just the page where the I tried to upload the file. Now every page on the entire site delivers the same message. Obviously, the client is none too pleased. Is concrete5 v8 really not usable? I used to love concrete5, because it just worked. Now uploading a PDF file crashes the whole site? Maybe it's something in my server environment, but this is honestly just ridiculous. Color me extremely aggravated and ready to learn a new system. Anybody?
An image could not be created from the given input
But, it's not just the page where the I tried to upload the file. Now every page on the entire site delivers the same message. Obviously, the client is none too pleased. Is concrete5 v8 really not usable? I used to love concrete5, because it just worked. Now uploading a PDF file crashes the whole site? Maybe it's something in my server environment, but this is honestly just ridiculous. Color me extremely aggravated and ready to learn a new system. Anybody?
There is a similar issue for .svg files, where the file manager tries to create a thumbnail and fails. If you look on the GitHub issues, you may get some ideas.
Thanks for the reply. So far, I haven't found anything useful there. I'll keep digging. The error log message is:
PHP Deprecated: Comments starting with a '#' are deprecated in /#####/php.ini on line 420 in Unknown on line 0
PHP Deprecated: Comments starting with a '#' are deprecated in /#####/php.ini on line 420 in Unknown on line 0
Am I the only one with this issue? I can't find a fix. Nor can I access any pages on the website. Unbelievable.
I'm wondering if this could be because the environment doesn't include the preferred graphics package, so c5 is falling back to a default package. Is it image_magic or something??
I'm also wondering whether it could be an out-of-memory issue. Was the PDF a large file? Extra memory can be consumed by the attempted creation of thumbnails (if that happens for PDFs).
The PDF was a whopping 360 KB. Not sure about your other question regarding the graphics package. Could be.
Hi DBKG,
Using concrete5 version 8.1.0, I was able to successfully upload a PDF using the file manager.
Please include the specific steps for how and where you uploaded a PDF. This would include what block, add-on, and if you are using any custom code.
Have you tried logging into the dashboard directly?
Example:
your_site_address.com/index.php/dashboard/files/search
Using concrete5 version 8.1.0, I was able to successfully upload a PDF using the file manager.
Please include the specific steps for how and where you uploaded a PDF. This would include what block, add-on, and if you are using any custom code.
Have you tried logging into the dashboard directly?
Example:
your_site_address.com/index.php/dashboard/files/search
Thanks for the reply. I get a Page Not Found with the theme and menu at that address. But anywhere I navigate from there goes back to the error message.
This was a straightforward (I thought) upload through the File Manager in a regular Content block. I did not notice a separate upload function for a file (unlike in 5.7> if I recall correctly), so I clicked on the Insert Image icon (if I missed something there, I suppose that's on me...) From the File Manager, I did the usual "Browse the computer" and dragged the PDF file into the window. Clicked Close. And voilà!
I have done no custom coding. The theme is Stride. The web address ishttp://bam-academy.com
Thanks again. I can modify code, noodle around in phpMyAdmin, and have access to edit the php.ini, but I am not a developer. So I'm baffled where to go to fix the durn thing.
This was a straightforward (I thought) upload through the File Manager in a regular Content block. I did not notice a separate upload function for a file (unlike in 5.7> if I recall correctly), so I clicked on the Insert Image icon (if I missed something there, I suppose that's on me...) From the File Manager, I did the usual "Browse the computer" and dragged the PDF file into the window. Clicked Close. And voilà!
I have done no custom coding. The theme is Stride. The web address ishttp://bam-academy.com
Thanks again. I can modify code, noodle around in phpMyAdmin, and have access to edit the php.ini, but I am not a developer. So I'm baffled where to go to fix the durn thing.
@DBKG
The picture icon in the rich text editor toolbar opens an Image Properties popup for inserting images. The issue was caused by a non-image being selected.
When you select a non-image, the preview displays a large red square with a white X inside. If the warning is ignored and the page is saved, this creates the error.
I will take a look to see how this error can be resolved and checks can be added to prevent it.
The picture icon in the rich text editor toolbar opens an Image Properties popup for inserting images. The issue was caused by a non-image being selected.
When you select a non-image, the preview displays a large red square with a white X inside. If the warning is ignored and the page is saved, this creates the error.
I will take a look to see how this error can be resolved and checks can be added to prevent it.
When I was uploading, even in the back of my mind I thought it didn't feel like the right way to do that. I did not see the red square with the X. In fact, the PDF filename showed up in the Content block as if it had been linked. Then all heck broke loose.
I should add that it's a new site with a clean 8.1 install. This was one of the final elements, and my next step was to do a backup. (Yay.) The web server is older, but it's running PHP 5.6.30
Can you get directly into the dashboard and revert the page version for the page or global you were editing?
No. I did try that. Thanks.
I've seen this before and to the extent it helps you and helps someone figure out what is happening, I've always been able to fix it by using:
SELECT * FROM `FileImageThumbnailPaths` WHERE `isBuilt` = 0 and change them to 1
If you have a large number for results, then use: UPDATE `FileImageThumbnailPaths` SET `isBuilt` = 1 WHERE `isBuilt` = 0
SELECT * FROM `FileImageThumbnailPaths` WHERE `isBuilt` = 0 and change them to 1
If you have a large number for results, then use: UPDATE `FileImageThumbnailPaths` SET `isBuilt` = 1 WHERE `isBuilt` = 0
@incipio
Both approaches worked, thank you.
@DBKG
After you use incipio's instructions, you can edit the Content block, highlight the broken image link text, and delete it.
Both approaches worked, thank you.
@DBKG
After you use incipio's instructions, you can edit the Content block, highlight the broken image link text, and delete it.
Maybe I missed it—where do I make these changes?
Thanks for your help.
Thanks for your help.
@DBKG
This can be done through phpMyAdmin:
- select your concrete5 database
- click the SQL tab in the top menu bar in the right pane
- in the textarea, you can enter the SQL query (one or the other, not both)
I recommend making a full backup (files and database) before making any database changes.
Also, please mark incipio's reply as the correct answer.
I tested this issue using the latest version of concrete5 on GitHub and no error is thrown.
This can be done through phpMyAdmin:
- select your concrete5 database
- click the SQL tab in the top menu bar in the right pane
- in the textarea, you can enter the SQL query (one or the other, not both)
SELECT * FROM FileImageThumbnailPaths WHERE isBuilt = 0;
UPDATE FileImageThumbnailPaths SET isBuilt = 1 WHERE isBuilt = 0;
I recommend making a full backup (files and database) before making any database changes.
Also, please mark incipio's reply as the correct answer.
I tested this issue using the latest version of concrete5 on GitHub and no error is thrown.
Thanks. It's been a long day, but I found them in the table. I probably stared at the text area without seeing it, but I was able to select each one and then change the 0 to a 1. Site is back up. (And backed up.)
Thank you to everyone! Y'all are lifesavers. I am much obliged.
I came to this thread because I had "Could not load image from string" on the login page, i fact on every page (red banner and no content).
I then updated all svg files in FileImageThumbnailPaths: I set the field isBuilt to 1.
After that everything works fine. I'm on v8.1.0
This happened suddenly without any changes I consciously did, very strange. Never had this on v5.7. The error msg seems to come from the imagine library. I tried to debug this further but had no luck. File permissions were OK and imagemagick seems to work fine.
Anyway: thanks for the hints here!
I then updated all svg files in FileImageThumbnailPaths: I set the field isBuilt to 1.
After that everything works fine. I'm on v8.1.0
This happened suddenly without any changes I consciously did, very strange. Never had this on v5.7. The error msg seems to come from the imagine library. I tried to debug this further but had no luck. File permissions were OK and imagemagick seems to work fine.
Anyway: thanks for the hints here!
@micihch
The issue with SVG files in 8.1.0 has been fixed in the upcoming version.
The issue with SVG files in 8.1.0 has been fixed in the upcoming version.
Great!