Erftralle / JoomGalleryPhotoSwipePlugin

Plugin extension for JoomGallery
GNU General Public License v2.0
4 stars 0 forks source link

W3C error caused by wrong rel attribute #12

Closed ThiloSO closed 6 years ago

ThiloSO commented 6 years ago

Hi there, it's not really a functional problem - but it would be nice to get the plugin running without w3c errors.

Right now w3c shows up with:

Error: Bad value "PhotoSwipe-v4plus-joomgallery" for attribute "rel" on element "a": The string "PhotoSwipe-v4plus-joomgallery" is not a registered keyword.

Any chance to get this fixed somehow?

Erftralle commented 6 years ago

Thanks for the hint!

Please change line 278 of plugins/joomgallery/photoswipe/photoswipe.php to

$attribs['data-rel'] = $this->title.'-'.$group;

and line 61 of media/plg_joomgallery_photoswipe/jg-photoswipe.js to

$("a[data-rel^='PhotoSwipe-v4plus']").on("click", function(event) {

and check the result.

Please also check if you find any backward compatibility problems with that change.

ThiloSO commented 6 years ago

Nice! Works well - installed it on two different setups and i can't see any compatibility problems.

Thanks so much!

Erftralle commented 6 years ago

Thanks for testing and your feedback. Released a new version just now.