After the recent core update to DRUPAL 8.4.2 the slideshow no longer displays on the homepage despite the selection being made in the theme configuration.

CommentFileSizeAuthor
#10 custom.js_.patch374 bytesbmatthewshea
#9 custom.js_.patch159 bytesbmatthewshea
#3 slider.png114.38 KBverhoevc

Comments

verhoevc created an issue. See original summary.

tibezh’s picture

Status: Active » Postponed (maintainer needs more info)

Hi @verhoevc, I've tested a slideshow on homepage in the Drupal 8.4.2 and 8.4.3, I don't have any problems.
Can you provide more details please. Did you look at developer console?

verhoevc’s picture

StatusFileSize
new114.38 KB

This is what I'm seeing.

issue

verhoevc’s picture

verhoevc’s picture

kncrabtree’s picture

I am having the same issue on version 8.x-1.7 of the theme, and I believe this is related to the jQuery version change from 8.3->8.4. In my production site (8.3.x), the slideshow works properly with jQuery2, but my development site broke upon updating to 8.4.x and jQuery3.

There is an uncaught typeError "a.indexOf is not a function" that triggers on:

// Can also be used with $(document).ready()
jQuery(window).load(function() {
    jQuery('.flexslider').flexslider({
        animation: "slide"
    });
});

This code needs to use the .on('load',...) method to work in jQuery3.

crispiatico’s picture

I have the same problem :-(
Theme Business 8.x-1.7 (
Drupal 8.4.5

anks’s picture

Yes, there is an issue with the jquery code.

As kncrabtree suggested need to replace the code of custom.js with following.

jQuery(window).on("load",function(e) {
  jQuery('.flexslider').flexslider({
    animation: "slide"
  });
});

This will resolve the issue.

Thanks,
Ankit

bmatthewshea’s picture

StatusFileSize
new159 bytes

(delete this)

bmatthewshea’s picture

StatusFileSize
new374 bytes

Please patch your code. It's 1 line to fix slider under 8.x.x.
The problem is you are trying to use a deprecated load from newer jquery. Console will tell you it cannot load them as-is:

jquery.min.js?v=3.2.1:4 Uncaught TypeError: a.indexOf is not a function
    at r.fn.init.r.fn.load (jquery.min.js?v=3.2.1:4)
    at custom.js?v=8.6.5:2
bmatthewshea’s picture

Priority: Normal » Critical
vojta’s picture

Same problem with Drupal 8.6.15, the suggested fix works well.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Needs review
bhumikavarshney’s picture

Status: Needs review » Reviewed & tested by the community

Yes, the above suggestion works good for me.

arborrow’s picture

I agree that the patch worked for me as well. Kindly update the package.

gauravvvv’s picture

This patch doesn't work anymore

 gauravmahlawat@Gauravs-Air business % git apply -v custom.js__0.patch
custom.js__0.patch:4: trailing whitespace.
// Can also be used with $(document).ready()
Checking patch custom.js   2019-01-13 19:00:21.788887336 +0000...
error: custom.js   2019-01-13 19:00:21.788887336 +0000: No such file or directory
gauravvvv’s picture

Status: Reviewed & tested by the community » Needs work
avpaderno’s picture

The patch needs to be created from the directory containing the module. From that directory, the custom.js file is in js/custom.js.

avpaderno’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2920983: Slideshow disappeared out of nowhere

Furthermore, the content of the custom.js file is the following.

// Can also be used with $(document).ready()
jQuery(window).on('load', function() {
  jQuery('.flexslider').flexslider({
    animation: "slide"
  });
});

The code has been fixed in commit 84cdd33, as result of #2920983: Slideshow disappeared out of nowhere, created on November 4, 2017. This issue is a duplicate of that issue.