mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #56939
[Bug 1855023] [NEW] Warning produced when adding/ editing an image gallery block
Public bug reported:
A warning message is being produced when adding or editing an image
gallery block (see attached screenshot)
To reproduce:
1) Log in as any user and create a page
2) Edit the page and select image gallery block, select some images, press save
expected results:
The page displays with an image gallery and no warnings
actual results:
The page displays with an image gallery and warnings:
"[WAR] 98 (blocktype/lib.php:2104) stripos() expects parameter 1 to be string, array given"
This issue is occurring because the javascript function
get_get_javascript_javascript($jsfiles) in blocktype/lib.php has been
set up to expect a non-empty file entry in its logic in its foreach
loop. This is an issue in artefact/file/blocktype/gallery/lib.php in
get_instance_javascript() which passes down an array with an empty file
entry:
array(
'file' => '',
'initjs' => "$('#slideshow{$blockid}').on('slid.bs.carousel', function () {
$(window).trigger('colresize');
});"
)
The get_get_javascript_javascript($jsfiles) should be amended to handle the above input.
Version: 20.04dev
** Affects: mahara
Importance: High
Status: New
** Attachment added: "Screenshot_2019-12-04 TEST PAGE - Mahara.png"
https://bugs.launchpad.net/bugs/1855023/+attachment/5309671/+files/Screenshot_2019-12-04%20TEST%20PAGE%20-%20Mahara.png
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1855023
Title:
Warning produced when adding/ editing an image gallery block
Status in Mahara:
New
Bug description:
A warning message is being produced when adding or editing an image
gallery block (see attached screenshot)
To reproduce:
1) Log in as any user and create a page
2) Edit the page and select image gallery block, select some images, press save
expected results:
The page displays with an image gallery and no warnings
actual results:
The page displays with an image gallery and warnings:
"[WAR] 98 (blocktype/lib.php:2104) stripos() expects parameter 1 to be string, array given"
This issue is occurring because the javascript function
get_get_javascript_javascript($jsfiles) in blocktype/lib.php has been
set up to expect a non-empty file entry in its logic in its foreach
loop. This is an issue in artefact/file/blocktype/gallery/lib.php in
get_instance_javascript() which passes down an array with an empty
file entry:
array(
'file' => '',
'initjs' => "$('#slideshow{$blockid}').on('slid.bs.carousel', function () {
$(window).trigger('colresize');
});"
)
The get_get_javascript_javascript($jsfiles) should be amended to handle the above input.
Version: 20.04dev
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1855023/+subscriptions
Follow ups
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Cecilia Vela Gurovic, 2020-04-29
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Cecilia Vela Gurovic, 2020-03-04
-
[Bug 1855023] A change has been merged
From: Mahara Bot, 2019-12-31
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Cecilia Vela Gurovic, 2019-12-31
-
[Bug 1855023] A change has been merged
From: Mahara Bot, 2019-12-31
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Cecilia Vela Gurovic, 2019-12-31
-
[Bug 1855023] A patch has been submitted for review
From: Mahara Bot, 2019-12-16
-
[Bug 1855023] A patch has been submitted for review
From: Mahara Bot, 2019-12-16
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Lisa Seeto, 2019-12-08
-
[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block
From: Robert Lyon, 2019-12-08