← Back to team overview

mahara-contributors team mailing list archive

[Bug 1855023] Re: Warning produced when adding/ editing an image gallery block

 

** Changed in: mahara/19.10
       Status: New => Fix Committed

-- 
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:
  Fix Committed
Status in Mahara 19.10 series:
  Fix Committed
Status in Mahara 20.04 series:
  Fix Committed

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


References