If a version is set for features with no hosted project, _features_export_generate() in features.admin.inc sets a project key. See https://drupal.org/node/542202#project. While the handbook permits module maintainers to use project_status_url, it discourages using the project key and specifically says module maintainers should not use it. In fact, many contrib modules do not have project keys in their info files. For features not hosted on drupal.org and lacking a project update URL, adding a project key breaks drush because the update module can't find version data for it on drupal.org.

Additionally, the project key is set to the module name. That seems counterintuitive. Assuming a project is hosted on drupal.org, isn't that always the case?

For this reason, I don't think a project key should be added.

After applying the patch, you need to update your existing features.

Remove project from existing features.
find . -type f -exec sed -i "s/project = .*//g" {} \;

CommentFileSizeAuthor
#3 features-project-2161841-3.patch681 bytesdavidwbarratt

Comments

davidwbarratt’s picture

Version: 7.x-2.0 » 7.x-2.x-dev
Priority: Normal » Critical

Note that everything from the line "; Information added by drupal.org packaging script on 2008-02-13" and down is added by the drupal.org packaging script. You should never manually add the project and datestamp keys.

https://www.drupal.org/node/171205

I'm marking this issue as Ciritical, because Drupal believes this is ciritcal. I get emails witch read:

There was a problem checking available updates [1] for Drupal.

See the available updates page for more information:
http://example.com/admin/reports/updates

Your site is currently configured to send these emails only when security
updates are available. To get notified for any available updates,
http://example.com/admin/reports/updates/settings.

[1] http://example.com/admin/reports/updates

Drupal also throws this error next to every "Features" module:

No available releases foundwarning

You also get this error everytime you check for Updates via the UI or via Drush:

Failed to get available update data for 28 projects.

davidwbarratt’s picture

Priority: Critical » Normal

I've found a workaround.

Since the "Version" field is no longer required, and the conditional for adding the "project" key is this:

  if (!empty($form_state['values']['version']) || !empty($form_state['values']['project_status_url'])) {
    $export['project'] = $form_state['values']['module_name'];
  }

Then by simply leaving off the "Version" and the "URL of update XML" you will not get the "project" key written to your module.

However, I do not think this is clear, and I think it's pointless having the project key if both items are not present.

davidwbarratt’s picture

StatusFileSize
new681 bytes

Attached is a patch that changes the condition from OR to AND. This should make it more difficult to run into this problem and also allow custom Features to have version numbers. :)

Thanks!

kenorb’s picture

Status: Active » Needs review
tobiasb’s picture

Issue summary: View changes

Thx. works for me. I added some notes.

tobiasb’s picture

Issue summary: View changes
kenorb’s picture

Status: Needs review » Reviewed & tested by the community
func0der’s picture

Legit. Merge please.

mpotter’s picture

Status: Reviewed & tested by the community » Fixed

  • mpotter committed 35c736b on 7.x-2.x authored by davidwbarratt
    Issue #2161841 by davidwbarratt: Adding a project key to features info...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.