Problem/Motivation

Flexslider 7.x-2.0-alpha3 and latest Flexslider version 2.3.0 are incompatible. Flexslider js-library is not found due to updated minified flexslider file version not including version number.

flexslider.module contains code that says flexslider library version is required to be 2.x.

Proposed resolution

  1. Fix version checking for library to NOT use minified js-file. Version is in jquery.flexslider.js -file header comment.
  2. Synchronize http://cgit.drupalcode.org/flexslider/tree/flexslider.make.example and http://cgit.drupalcode.org/flexslider/tree/README.md to instruct using same branch/version.

Remaining tasks

  • Fix version checking in
    • flexslider.install
    • flexslider.module
  • Decide based on version fix how to update flexslider.make.example and README.md
  • Minor: fix all references to README.txt in flexslider.install to README.md

User interface changes

None.

Comments

rpsu’s picture

This commit removes header with version in Flexslider library https://github.com/woothemes/FlexSlider/commit/58a4981c7b39e384f56831fd3...

So I suggest either revert header removal in jquery.flexslider-min.js or rely in jquery.flexslider.js for version checking.

Using version 2.2 from URL https://codeload.github.com/woothemes/FlexSlider/zip/version/2.2 works without problems.

rpsu’s picture

rpsu’s picture

Flexslider maintainer replied: "will fixed in the next release scheduled for 23 Feb" in version 2.4.0.

https://github.com/woothemes/FlexSlider/milestones/2.4.0

drupalninja99’s picture

2.2 worked for me thx!

Prancz_Adam’s picture

It is easy to fix in the module's install file:
$js = file_exists($path . '/jquery.flexslider.js') ? fopen($path . '/jquery.flexslider.js', 'r') : fopen($path . '/jquery.flexslider.js', 'r');

And in the .module file:

 $libraries['flexslider'] = array(
    'name' => 'FlexSlider',
    'vendor url' => 'http://www.woothemes.com/flexslider/',
    'download url' => 'https://github.com/woothemes/FlexSlider',
    'version arguments' => array(
      'file' => 'jquery.flexslider.js',
      // jQuery FlexSlider v2.1
      'pattern' => '/jQuery FlexSlider v(\d+\.+\d+)/',
      'lines' => 2,
    ),
    'files' => array(
      'js' => array(
        'jquery.flexslider.js',
      ),
      'css' => array(
        'flexslider.css',
      ),
    ),
    'integration files' => array(
      'flexslider' => array(
        'css' => array('assets/css/flexslider_img.css'),
      ),
    ),
  );

It solve the issue for me. I know that hacking modules is not too elegant, but it is a temporarly solution...

rpsu’s picture

Most certainly it works, however your fix to .module file kinda contains if-clause which effectively has no meaning. Checking file existence and opening it regardless if it exists...

Using flexslider library version 2.2 seems to have no drawbacks. Just download that instead of master-branch as in #1.

rhys’s picture

Does the patch on https://www.drupal.org/node/2305609#comment-9667093 resolve this issue for you? As it directly only targets the normal JS and not the minified version.

rpsu’s picture

Status: Active » Closed (duplicate)