I have installed levelten_apps and it is downloading images like the one from this URL:


which is a wrong url. Method apps_retrieve_app_image should check if it has downloaded a right image before saving it to drupal public files.

I'm attaching a possible patch

Members fund testing for the Drupal project. Drupal Association Learn more


sylus’s picture

Status: Active » Needs review
831 bytes

Patch works great for me and fixed a whack of problems when an app is installed locally using a manifest.app and the file permissions make the screenshot + logo inaccessible.

Rerolled the patch so will work with drush make.

Should also likely be used in conjunction with:


sylus’s picture

Applied to wrong branch here is the proper patch

febbraro’s picture

Status: Needs review » Needs work
+++ b/apps.manifest.incundefined
@@ -265,11 +265,16 @@ function apps_retrieve_app_image($url, $title = FALSE, $alt = FALSE) {
+    else {
+      // TODO delete managed file object
+      file_unmanaged_delete($current->uri);

What is this part of the patch doing?

jnorell’s picture

597 bytes

Here's an alternate patch that fixes the same error for missing webform_screenshot.png in a different approach - it returns current file info if the http request has an error. Probably use both the above to not save the bad ".png" file and this one to handle missing files in http requests even if the current file is valid.

(See also http://drupal.org/node/1908824)

pfrenssen’s picture

Status: Needs work » Closed (duplicate)

Marking this as a duplicate of #2081587: When an app tries to download an invalid logo a random placeholder file is created as that issue has a patch that applies to the current HEAD, and also checks if the downloaded file is an actual image.