doufangmu9087 2017-04-13 21:09
浏览 59
已采纳

Concrete5:无法从给定输入创建图像

Using Concrete5 8.1, I am getting the error An image could not be created from the given input on every page.

I created a custom theme, custom Thumbnail sizes, and custom Page Types, most of the site content has been entered and everything was working well. In reviewing the site before it goes live, I noticed most of the images had been uploaded as fairly large images (2000-4000 pixels wide, nothing insanely huge, but large enough that I wanted to do something about it).

Based on the Concrete5 documentation, I added the following code:

  public function getThemeResponsiveImageMap() {
    return array(
      'timeline_gallery' => '0'
    );
  }

The timeline_gallery thumbnail has existed since the start of this project, so all images should have already had this thumbnail. But when I refreshed the page, I see the error: An image could not be created from the given input.

Google finds many entries for this error: potentially related to GD not being able to process SVG, PNG, or very large images, and the solution is to address the problem images within the File Manager. However, I cannot get to the File Manager - I cannot get to any page on the site, including any of the dashboard pages (all display the same error).

I then remove the 5 lines of code from above (the only code changes that have taken place over the past 24 hours) and save the page_theme.php, but I still see the same error on every page.

It would be great to be able to fix the image sizes, but at this point, I'd just like to clear the error and make the site work again. I have looked at the Apache log for any specifics on the error (no help, since the error doesn't show up), I have restarted Apache, and then rebooted the machine (all to no avail). With the code being the same as when the site was working earlier today (and all content editors have left, so no content changes have taken place), I'm guessing there might be a queue, either in the file system or database, of images to be resized and one of them is causing an issue... but it's just a guess.

  • 写回答

1条回答 默认 最新

  • dq13733519262 2017-04-14 06:21
    关注

    You can clear the error by modifying the FileImageThumbnailPaths table.

    1. Find the table entry where isBuilt is 0.

      SELECT * FROM FileImageThumbnailPaths WHERE isBuilt = 0;
      
    2. In the results, change the entry isBuilt column to 1.

    If you have multiple entries to change, you can change them all at once.

    UPDATE FileImageThumbnailPaths SET isBuilt = 1 WHERE isBuilt = 0;
    

    Using 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

    Before making any changes to the database, please make a full backup of your database and site files.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 孟德尔随机化结果不一致
  • ¥20 求用stm32f103c6t6在lcd1206上显示Door is open和password:
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法