← Back to team overview

mahara-contributors team mailing list archive

[Bug 1999350] [NEW] Submissions not showing if wwwroot is not set

 

Public bug reported:

If $cfg->wwwroot is not set and wwwroot in the config table is also not
set then the path to piertables.js is prefixed with a "/".  When this is
added to $js in htdocs/module/submissions/src/Controller.php it
ultimately ends up with an extra "/" after it is rendered in the
template.

This results in the browser seeing this as a protocoless URL and failing
to resolve the host.

To test:
Stand up a site without $cfg->wwwroot set. Ensure 'wwwroot' is empty in the config table in the database.
Create a Group such that submissions can be made to it.
As an account that can submit to that Group create a page or collection and submit it to the Group.
As an account that can view Group submissions click through to the Submissions page for the Group.

You will note that the submission is not visible.
If you view the page source and search for piertables.js you will see the path prefixed with "//".
If you open your browser devtools, on the network tab you will see the file does not report as succeeding to load.

** Affects: mahara
     Importance: Low
     Assignee: Gold (gold.catalyst)
         Status: In Progress


** Tags: bite-sized

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

Title:
  Submissions not showing if wwwroot is not set

Status in Mahara:
  In Progress

Bug description:
  If $cfg->wwwroot is not set and wwwroot in the config table is also
  not set then the path to piertables.js is prefixed with a "/".  When
  this is added to $js in htdocs/module/submissions/src/Controller.php
  it ultimately ends up with an extra "/" after it is rendered in the
  template.

  This results in the browser seeing this as a protocoless URL and
  failing to resolve the host.

  To test:
  Stand up a site without $cfg->wwwroot set. Ensure 'wwwroot' is empty in the config table in the database.
  Create a Group such that submissions can be made to it.
  As an account that can submit to that Group create a page or collection and submit it to the Group.
  As an account that can view Group submissions click through to the Submissions page for the Group.

  You will note that the submission is not visible.
  If you view the page source and search for piertables.js you will see the path prefixed with "//".
  If you open your browser devtools, on the network tab you will see the file does not report as succeeding to load.

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



Follow ups