Fancybox lightbox JS & CSS not included in HTML Export

Bug #1963986 reported by Tristan daCosta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

I've noticed that the Fancybox 3 JS & CSS is not included in the HTML export, regardless of whether the Fancybox option is enabled in the Gallery block or not.

I would propose that if Fancybox is enabled (/admin/extensions/pluginconfig.php?plugintype=blocktype&pluginname=file/gallery), then Fancybox JS & CSS be included in the <head> of the index.html on HTML exports.

I can see how to easily add in fancybox into the 'scripts' array, but the CSS array is built by looking through css within the 'themes' folders and I'm not sure what the best way to add fancybox CSS into this one (minified Fancybox CSS lives in the 'JS/Fancybox' folder).

Thanks

Revision history for this message
Tristan daCosta (tristanjdacosta) wrote (last edit ):

I can confirm the following will fix this issue.

htdocs/export/html/lib.php
Line 65:
       private $scripts = array('jquery', 'popper.min', 'bootstrap.min', 'dock', 'modal', 'lodash', 'gridstack', 'gridlayout', 'masonry.min', 'select2.full', 'fancybox.min', 'theme');

Line 1085:
Add fancybox file to export
$directoriestocopy[get_config('docroot') . 'js/fancybox/jquery.fancybox.min.js'] = $jsdir . 'fancybox.min.js';

Also:
Copy jquery.fancybox.min.css to /htdocs/theme/raw/style/jquery.fancybox.min.css (original location is js/fancybox/jquery.fancybox.min.css)

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Tristan,

Can you please let us know which version of Mahara you are looking at?

Thank you
Kristina

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.