Site pages admin pagination ajax [Error]: Call to undefined method View::get_template_views()

Bug #1703787 reported by Mark Webster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Unassigned
16.04
Fix Released
High
Unassigned
16.10
Fix Released
High
Unassigned

Bug Description

Mahara 16.10.2 (present in .4 too)

Ajax call to /json/viewlist.php when using pagination or results per page dropdown on /admin/site/views.php results in:

error:true
error_class:"SystemException"
error_message:"[Error]: Call to undefined method View::get_template_views()"
error_name:"SystemException"
error_number:0
error_rendered:"A nonrecoverable error occurred. This probably means you have encountered a bug in the system"

Changed in mahara:
status: New → Incomplete
status: Incomplete → Confirmed
importance: Undecided → Medium
milestone: none → 16.10.5
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Mark, are you going to fix this issue?

Not a problem in 17.04 as the methods changed.

Test instructions:

1. Create more than 20 pages in Admin -> Configure site -> Pages.
2. Try changing the paginator to show only 1 result:

Expected result: The call is processed and only one result is displayed per page.
Actual result: The drop-down menu choice doesn't have any effect.

3. Click the paginator to go to a different result page.

Expected result: You see the results on the selected page.
Actual result: Nothing happens.

Robert Lyon (robertl-9)
Changed in mahara:
importance: Medium → High
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7986

Revision history for this message
Robert Lyon (robertl-9) wrote :

This was caused by commit b73b5e70b94a1afee19a1245a651a5bd020d58c2 where we changed the function name to call from View::get_template_views() to View::get_site_template_views() but forgot to update the json/viewlist.php to use the same function.

Changed in mahara:
milestone: 16.10.5 → none
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "16.04_STABLE" branch: https://reviews.mahara.org/7987

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7987
Committed: https://git.mahara.org/mahara/mahara/commit/7e50299ef024445838e19165d4d69366d174408e
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.04_STABLE

commit 7e50299ef024445838e19165d4d69366d174408e
Author: Robert Lyon <email address hidden>
Date: Thu Sep 7 09:25:58 2017 +1200

Bug 1703787: Pagination failing for site pages

Due to the json file not using the correct call to site templates

It was updated for the initial page load but not for the json load of
pagination results

behatnotneeded

Change-Id: Icea835bc6252df05aac8b3a6cf367d1f2364f7ea
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7986
Committed: https://git.mahara.org/mahara/mahara/commit/ffc16c222a6b0e58a0131fb9f6bdede1e185b3f0
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit ffc16c222a6b0e58a0131fb9f6bdede1e185b3f0
Author: Robert Lyon <email address hidden>
Date: Thu Sep 7 09:25:58 2017 +1200

Bug 1703787: Pagination failing for site pages

Due to the json file not using the correct call to site templates

It was updated for the initial page load but not for the json load of
pagination results

behatnotneeded

Change-Id: Icea835bc6252df05aac8b3a6cf367d1f2364f7ea
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
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.