← Back to team overview

mahara-contributors team mailing list archive

[Bug 1981386] Re: select2.full.js doesn't load if wwwroot is not set

 

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
       Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1981386

Title:
  select2.full.js doesn't load if wwwroot is not set

Status in Mahara:
  Fix Committed

Bug description:
  If $cfg->wwwroot is not set it defaults to '/'.  In head.tpl (linked
  below) this file is included with a src of
  {$WWWROOT}/js/select2/select2.full.js

  In the resulting html this becomes //js/select2/select2.full.js and
  the browser will translate that to https://js/select2/select2.full.js
  which is a broken link.

  There are many other <script> tags on this template and none have the
  leading '/' before the 'js' dir.

  To test:

  Stand up a site and comment out $cfg->wwwroot in config.php so it is not set.
  Point a browser at the site.
  Check select2.full.js in the network tab of your browsers devtools.
  Set $cfg->wwwroot in config.php so it is set to the domain you access your dev site on.
  Reload the site in your browser
  Check select2.full.js in the network tab of your browsers devtools.

  
  c.f. https://git.mahara.org/mahara/mahara/-/blob/main/htdocs/theme/raw/templates/header/head.tpl#L31

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1981386/+subscriptions



References