OK, I'm partly to blame for this .. mainly because I didn't pay enough attention when updating this module (as I had a lot of module updates)... however I didn't think that the update to this module would have such major changes.

Basically, it would be very nice to warn those users that don't pay enough attention (like me) that the Views Slideshow 3 is for Views 3 and that there is no upgrade path (I know this information is already on the project page... this is highly critical information but does not stand out enough.

It would be nice to be warned about the lack of compatibility when updating the module... so it can be reverted immediately.

CommentFileSizeAuthor
#4 1468816-d7-1.patch437 bytesldpm

Comments

robinmofo’s picture

Sorry.... a good way to make this "very clear" would be to copy the Views project page; by putting v6.3 under "Other Releases" and keeping the v6.2 under the "Recommended" version.

redndahead’s picture

Title: Make critical update information MUCH CLEARER » Use hook_requirements to check for views version
Version: 6.x-3.0 » 7.x-3.x-dev

Except version 3 is recommended. I can see if I can use hook_requirements to see if the views version is correct.

ldpm’s picture

Assigned: Unassigned » ldpm

(assigning to myself to work on)

ldpm’s picture

Assigned: ldpm » Unassigned
Status: Active » Needs review
StatusFileSize
new437 bytes

Drupal 7 can simply require a version number in the dependencies section of the .info file. A patch is attached.

However, we should use hook_requirements for the Drupal 6 version, similar to the d7 code below.

<?php

/*
 * Implementation of hook_requirements
 */
function views_slideshow_requirements($phase) {
  $requirements = array();
  if ($phase == 'install') {
    // check that views is version 3, not 2
    if (!function_exists('views_api_version')) {
      $requirements['views'] = array(
          'value' => t('Not Installed'),
          'severity' => REQUIREMENT_ERROR,
          'description' => t('Views Slideshow 3.x requires Views 3.x.  Views
             does not appear to be installed.'),
      );
    } else {
      $views_ver = views_api_version();
      if ($views_ver != "3.0") {
        $requirements['views'] = array(
            'value' => t('%ver', array('%ver'=>$views_ver)),
            'severity' => REQUIREMENT_ERROR,
            'description' => t('Views Slideshow 3.x requires Views 3.x.  Your
              version of Views does not match.'),
        );
      } else {
        $requirements['views'] = array(
            'value' => t('Installed'),
            'severity' => REQUIREMENT_OK,
        );
      }
    }
    $requirements['views']['title'] = t('Views Module');
  }
  return $requirements;
}
redndahead’s picture

Status: Needs review » Fixed

This was committed for 7.x and 3.x

Status: Fixed » Closed (fixed)

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