Loading...
 
Skip to main content

Slider doesn't work

Status
Pending
Subject
Slider doesn't work
Version
22.x
Category
  • Regression
Feature
Slideshow
Resolution status
Won't Fix
Submitted by
ilkkao
Lastmod by
ilkkao
Rating
(0)
Description

Because this bug report supports {SLIDER}, below is a demo that demonstrates the error. See the JS error this bug report page generates in developer console.

Copy to clipboard
{SLIDER( width="80%" theme="mini-light" expand="n" resizecontents="n" buildarrows="y" buildnavigation="y" buildstartstop="n" togglearrows="y" togglecontrols="y" enablearrows="y" enablenavigation="y" enablekeyboard="y" autoplay="y" autoplaylocked="n" autoplaydelayed="y" pauseonhover="y" stopatend="n" delay="4000" animationtime="1000" hashtags="n")}{img fileId=1522} {SLIDER}


START OF DEMO

{SLIDER( width="80%" theme="mini-light" expand="n" resizecontents="y" buildarrows="y" buildnavigation="y" buildstartstop="n" togglearrows="y" togglecontrols="y" enablearrows="y" enablenavigation="y" enablekeyboard="y" autoplay="y" autoplaylocked="n" autoplaydelayed="y" pauseonhover="y" stopatend="n" delay="4000" animationtime="1000" hashtags="n")}Image
{SLIDER}

END OF DEMO

This resulted in a working slider in 21. After upgrade I get the following JS error:

Copy to clipboard
jquery.min.js:2 Uncaught TypeError: b.replace is not a function at Function.ga.matchesSelector (jquery.min.js:2) at Object.add (jquery.min.js:3) at jquery.min.js:3 at Function.each (jquery.min.js:2) at a.fn.init.each (jquery.min.js:2) at ya (jquery.min.js:3) at a.fn.init.on (jquery.min.js:3) at a.fn.init.a.fn.<computed> (min_main_124e21a7d76a2835b01c446b47408413.js:formatted:194) at a.fn.init.jQuery.fn.load (min_main_124e21a7d76a2835b01c446b47408413.js:formatted:63128) at $.anythingSlider.base.updateSlider (min_main_bb326a0cdb1e9f74c977e7507c0fafb4.js:formatted:226)


Web page where this happens: https://kipinapartio.fi/

I debugged this a bit and tracked it down to git commit
Copy to clipboard
70b0df71119d5592677ba37b1a801f5fb406bba6 which adds a new load jQuery method. This method calls element.tikiModal(tr('Loading...'));
In the case of slider element is Window object. Modal doesn't support window as it tries to modify or read z-index which doesn't exists for window. Maybe just add if statement around tikiModal line and not call it if the element is window?


Update:
Actually I (@luci) see this in Chrome console:

Copy to clipboard
Uncaught TypeError: Cannot read property 'defaultView' of undefined at Ie (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at Be (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at Function.css (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at min_main_3da61fe09f318f29e486129fa2ff5e86.js:184 at $ (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at a.fn.init.css (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at min_main_3da61fe09f318f29e486129fa2ff5e86.js:5502 at Function.each (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at a.fn.init.each (min_main_3da61fe09f318f29e486129fa2ff5e86.js:184) at a.fn.init.$.fn.tikiModal (min_main_3da61fe09f318f29e486129fa2ff5e86.js:5502)


Weirdly demoing the SLIDER here prevents displaying of the comments below the tracker item? (not particularly weird, the comments are loaded by ajax so if the javascript in the page is broken it doesn't get to that call )

Workaround

This slider plugin is based on anything slider which seems to have been abandoned and it uses a function that has now been removed from jQuery 3.x - i guess we should delete the wiki plugin?

You can work round this by using resizecontents="y" in the plugin, or, i would recommend, move to using the bootstrap carousel in plugin list, or use a more modern slider plugin like PluginSwiper (as seen on Slider Comparison )

Importance
8
Easy to solve?
6
Priority
48
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7600
Created
Sunday 08 November, 2020 17:55:08 UTC
by ilkkao
LastModif
Wednesday 24 March, 2021 12:00:46 UTC


Show PHP error messages