Today, my site's Update status module started squawking about the Token module. See attached image.

Here's the state of the Token module:

  • I've used Token dev versions for months because they have a bugfix needed for another module.
  • I installed Token 6.x-1.x-dev (2009-Apr-10) on April 12 (8 days ago).
  • The recommended version is 6.x-1.11 (Aug 2, 2008).

Why would I be alerted today when I have not been alerted about the Aug. 2 release in months?

Looks like you may have a possible bug: newer "development version" causes the recommended version to be flagged again when you are using an older development version.

What should happen: should not be advised to use "recommended version" if using a newer dev version.

CommentFileSizeAuthor
updatestatus.png24.29 KBaren cambre

Comments

dave reid’s picture

Component: update system » update.module

Moving to the proper queue. The update system relates to update.php, while update.module is the "available updates" page, etc.

markus_petrux’s picture

Version: 6.10 » 6.x-dev

I haven't looked at update.module for a fix. Instead I fixed this using a custom module that implements hook_update_status_alter().

/**
 * Implementation of hook_update_status_alter().
 */
function mycustommodule_update_status_alter(&$projects) {
  foreach ($projects as $project => $project_info) {
    // Search for projects that are not up to date, but we have the development version.
    if ($project_info['status'] == UPDATE_NOT_CURRENT && $project_info['install_type'] == 'dev' && !empty($project_info['datestamp'])) {
      $existing_version = $project_info['existing_version'];

      // Now, check if there is still a release for our development version.
      if (isset($project_info['releases'][$existing_version])) {

        // If our installed version has a timestamp greater of equal to the
        // latest development snapshot, then we're ok, regardless of the
        // latest official version released.
        if ($project_info['datestamp'] >= $project_info['releases'][$existing_version]['date']) {
          $projects[$project]['status'] = UPDATE_CURRENT;
        }
      }
    }
  }
}

I hope that helps to track down the issue.

[EDIT] I have updated the code in my installation to optimize the conditions, and so I reflect this here.

The thing is that when I have a development version, I think I'm only interested to know if there's a new development snapshot for the version I have installed, regarless of the latest official version.

dave reid’s picture

Status: Active » Fixed

So what I'm seeing from the screenshot you provided is that the development snapshot for token was updated with new code, so it was alerting you to that. Not sure what the problem is and it seems to be working as designed. We've also fixed some bugs with some development snapshot handling for the latest release.

Status: Fixed » Closed (fixed)

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

aren cambre’s picture

Status: Closed (fixed) » Active

The confusion came because update.module is recommending I downgrade to the "recommended version." It seems that if I am running a dev newer than the recommended version, then the newer dev release should be highlighted, not the recommended version.

eric_a’s picture

Status: Active » Closed (works as designed)

Old issue.
Anyway, projects flag releases as supported and/or recommended. The flags are about releases, not update paths. An older release may be recommended on the basis that the newer dev is unstable/ broken/ abandoned.