mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #43264
[Bug 1700997] Re: View::create() throws an error if a layout has to be created on the fly
Thanks for letting us know your connection to Mahara. I saw SelfPad in
action last year at Mahara Hui FR and look forward to seeing an updated
version.
** Changed in: mahara
Status: New => Invalid
--
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/1700997
Title:
View::create() throws an error if a layout has to be created on the
fly
Status in Mahara:
Invalid
Bug description:
We have an external app that creates Views in Mahara. While creating
Views it creates the corresponding layout if needed. However, an error
was alwasys thrown at lib/view.php:334 when calling
ensure_record_exists('view_rows_columns', $vrc, $vrc);. As the $vrc
record is created, the DB insert fails because $vrc->view is null, as
the view is not (yet) created.
The attached patch fixes this by ensuring the view is saved in the DB
(and thus haves an ID) before attempting to create the $vrc object.
Mahara version : 17.04.2
OS : GNU/Linux Debian 8.8
DB : MySQL 5.5
PHP : 5.6
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1700997/+subscriptions
References