← Back to team overview

mahara-contributors team mailing list archive

[Bug 1588606] Re: Properly checking if group template is a site template

 

To test:

Make a new site and then try and edit the Administration -> Configure
site -> Pages Group homepage template

you should get an error
[WAR] 80 (lib/errors.php:796) Failed to get a recordset: postgres8 error: [-2: ERROR:  syntax error at or near "LIMIT"
LINE 1: SELECT * FROM "group"  WHERE "id" = ?  LIMIT 2
                                              ^] in EXECUTE("SELECT * FROM "group"  WHERE "id" = ?  LIMIT 2")
Command was: SELECT * FROM "group"  WHERE "id" = ?


This is due to trying to get a group with no id:    get_record("group", "id", null) at ../htdocs/view/blocks.php:92

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

Title:
  Properly checking if group template is a site template

Status in Mahara:
  In Progress
Status in Mahara 16.04 series:
  In Progress
Status in Mahara 16.10 series:
  In Progress

Bug description:
  The $view->get('template') returns a string where as the constant
  View::SITE_TEMPLATE is an integer so we can't compare them via ===

  We can use == as View::SITE_TEMPLATE = 2

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


References