Reviewed:  https://reviews.mahara.org/c/mahara/+/12984
Committed: 
https://git.mahara.org/mahara/mahara/commit/fd7d2e5c34cac028d39541a37b1d6a539279c295
Submitter: "Robert Lyon <[email protected]>"
Branch:    main

commit fd7d2e5c34cac028d39541a37b1d6a539279c295
Author: Gold <[email protected]>
Date:   Tue Jul 12 14:32:39 2022 +1200

Bug 1981386 - fix select2 js path when wwwroot is not set

Removed the leading slash.

This has been extended out to removing the leading slash from many other
locations it was found to be present.

Signed-off-by: Gold <[email protected]>
Change-Id: Id2c22f53c55dfb8f9eb8c37e4b87fd0ea5464415

-- 
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


_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to