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.

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

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度