ProfessionalWiki / chameleon

Provides a highly flexible and customizable skin using Bootstrap 4
https://www.mediawiki.org/wiki/Skin:Chameleon
Other
114 stars 62 forks source link

SMW pagewidget result format not working #346

Closed krabina closed 2 years ago

krabina commented 2 years ago

The pagewidget result format of SRF is working with vector skin, but not with chameleon, see https://github.com/SemanticMediaWiki/SemanticResultFormats/issues/724

Uncaught TypeError: No method named ".slide" Carousel carousel.js:531 jQuery 2 _jQueryInterface carousel.js:506 <anonymous> ext.srf.pagewidget.carousel.js:58 jQuery 2 <anonymous> ext.srf.pagewidget.carousel.js:57 jQuery 2 <anonymous> ext.srf.pagewidget.carousel.js:46 jQuery 2 [carousel.js:531:16](extensions/Bootstrap/resources/bootstrap/src/carousel.js) Carousel carousel.js:531 jQuery 2 _jQueryInterface carousel.js:506 <anonymous> ext.srf.pagewidget.carousel.js:58 jQuery 2 <anonymous> ext.srf.pagewidget.carousel.js:57 jQuery 2 <anonymous> ext.srf.pagewidget.carousel.js:46 jQuery 2

malberts commented 2 years ago

I suspect this is because both SRF and Bootstrap have a carousel component and their JavaScript interfaces are similar. It looks like the wrong one is getting created here.

If my assumption is correct, then I think it might make more sense to change/fix this in SRF (i.e. change the JavaScript class/function name slightly), since SRF's JavaScript is self-contained. Changing it in Chameleon/Bootstrap is going to require changing upstream Bootstrap. Even if it's possible to change the loading order in Chameleon/Bootstrap, it's still going to be a problem if you somehow have both SRF and Bootstrap carousels on the same page.

krabina commented 2 years ago

I agree, It should be changed in SRF. Would be great if you could find the time to do it :-)

malberts commented 2 years ago

Fixed in SRF: https://github.com/SemanticMediaWiki/SemanticResultFormats/pull/727