2

On my "Available updates" page I get error messages when there are custom modules in use:

Failed to get available update data for one project.

Is there any way to avoid this? Either by setting up some sort of feed for custom modules (probably not practical in most situations!) or by excluding custom modules from the list?

(As an aside, it seems like a design flaw in the Update manager module to give an error for custom modules. If they are in the custom directory inside modules then it can easily determine that they are custom, and clearly should not expect to receive update data for them from the same source as contributed modules.)

Is there any solution to this other than filing a bug report and hoping the maintainer agrees with my perspective? (Or hacking the module myself.)

3

Using the tip that junedkazi gave (please up-vote his answer too if this helps you!), I add this line to the .module file for my feature module:

include_once('<my_module>.exclude_from_update_list.inc');

And in the file <my_module>.exclude_from_update_list.inc:

<?php
/**
 * @file
 * <my_module>.exclude_from_update_list.inc
 */

/**
 * Implements hook_update_projects_alter().
 */

function <my_module>_update_projects_alter(&$projects) {
  unset($projects['<my_module>']);
}

And it worked perfectly. I took the precaution of backing up the database first, and of course I did this in a non-production environment.

This is all pretty obvious once you know about that hook, but I'm putting the code here for sake of a more complete reference, hoping it speeds things up for someone else.

2

Have a look at hook_update_projects_alter

for example, if there is a site-specific module that doesn't have any official releases, that module could remove itself from this list to avoid "No available releases found" warnings on the available updates report. In rare cases, a module might want to alter the data associated with a project already in the list.

You should also have a look at hook_update_status_alter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.