Having a Problem With SilverStripe FlexSlider? Fix It!

SilverStripe

Note: You may have problems with your first installation of SilverStripe FlexSlider, there is a trick.

Have faith, the SilverStripe FlexSlider does work. The installation appears straight forward. Loading of images can be a bit clumsy, but is functional. The use of shortcode is easy, and insertion into the template files is simple. The details on loading and use of SilverStripe’s implementation of FlexSlider is at http://www.netefx.de/Silverstripe-flexslider.php.

However, there are two problem with the installation.

  1. There is a problem with one step in the instructions

    Install flexslider as explained on the page referenced above, but:

    • When the instructions tell you to add
      Object::add_extension(‘Page’, ‘FlexSliderExtension’) ;
      to mysite/_config.php, stop,
    • Run dev/build?flush=1 first,
    • Then go to mysite/_config.php and insert the line, and
    • Follow that with another dev/build?flush=1.

    If you install the add_extension() before building the database,
    you will get an installation error.

  2. Line 219 of flexslider/code/FlexSlider.php must be commented out

    The line “Requirements::javascript(THIRDPARTY_DIR . ‘/jquery/jquery.js’);” at line 219 of flexslider/code/FlexSlider.php must be commented out. This line loads jQuery.js, but, the default install of SilverStripe loads jquery.js. If jquery.js is loaded twice, jquery code becomes confused and jquery calls, such as calls to $FlexSlider() become confused and fail.

If you use the above adjustments to the documented install procedures on http://www.netefx.de/Silverstripe-flexslider.php, you should be running smoothly in no time.

 

 

Leave a Reply