Error: cannot get $item->views of a collection with pages on 'Create' -> 'Tags'

Bug #1949003 reported by Doris Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Doris Tam

Bug Description

http://<your path to mahara>/tags.php

Replicate bug:
- create an empty collection (set portfolio completion to 'Yes')
- Go to 'Create'->'Tags'
Expected: no errors
Actual: errors about not finding $item->views

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "main" branch: https://reviews.mahara.org/12185

Doris Tam (doristam)
summary: - Error: cannot get a url of a collection with pages on 'Create' -> 'Tags'
+ Error: cannot get $item->views of a collection with pages on 'Create' ->
+ 'Tags'
Doris Tam (doristam)
Changed in mahara:
milestone: none → 22.04.0
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Marking this as low as typically we'll set up collections with at least one page.

Changed in mahara:
milestone: 22.04.0 → none
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Robert Lyon (robertl-9) wrote :

Ah I see how the error occurred now - it's when you have an empty collection that is also has 'Portfolio completion' turned on.

This causes the collection to have a special page but no 'true' pages.

So to repeat the error one needs to do the following:

1) Install a site
2) Go to Admin -> Institutions and edit the institution and turn on 'Portfolio completion'
3) Go to Create -> Pages and collections and make a collection and set a tag for it (but do not add any pages)
4) Go to the Create -> Tags page

See the error

Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
status: Confirmed → In Progress
description: updated
Changed in mahara:
milestone: none → 22.04.0
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12185
Committed: https://git.mahara.org/mahara/mahara/commit/4187efd0d394f7354edfb6e787473d45603dd3b6
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit 4187efd0d394f7354edfb6e787473d45603dd3b6
Author: Doris Tam <email address hidden>
Date: Thu Oct 28 12:58:53 2021 +1300

Bug 1949003: Error on 'Create' -> 'Tags' when have empty collection

Change-Id: I544764e5ac4e3b7b332d39ce16f5b200c2bdeeff

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Gold (gold.catalyst)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.