Group homepage doesn't display all blocks anymore

Bug #1429518 reported by Kristina Hoeppner on 2015-03-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Aaron Wells

Bug Description

current master for 15.04

On a fresh database with master built 2015021900, I don't have all blocks displayed anymore on the group homepage. Group pages and members are missing. They are still there when I go into edit mode, but don't display. This prevents me from testing patches.

Jono Mingard (mingard) wrote :

Seems to have been introduced by (Load block contents by AJAX) - commit 1a81f7b in the main repo

Changed in mahara:
status: New → Confirmed
Jono Mingard (mingard) wrote :

OK, this is basically because of the hide_title_on_empty_content method called in blocktype/lib.php:877 - if that method is implemented in a blocktype then render_viewing() will return nothing (not render a template at all). In master, only the Group pages and members blocktypes implement this (for some reason)

Jono Mingard (mingard) wrote :

(Relevant line in blocktype/lib.php is actually 920 in latest master - apologies)

Robert Lyon (robertl-9) on 2015-03-08
Changed in mahara:
assignee: nobody → Aaron Wells (u-aaronw)
Aaron Wells (u-aaronw) wrote :

Right, so it turns out the problem only affects blocks that use the "hide_title_on_empty_content()" method, which, in core, is only the Group Pages & Group Members blocks.

I've submitted a patch to solve the problem by not ajaxifying blocks that are using hide_title_on_empty_content().

Aaron Wells (u-aaronw) wrote :

On the downside, the Group Pages block is potentially a long-running block, because it has to do access control checks. Although I suppose it probably gets a speed boost because it limits the search to only pages that are owned by this one specific group.

If we encounter Groups that have a slow Group Homepage load time because of the Group Pages block, then we'll want to considering revisiting this and figuring out a way to Ajaxify the Group Pages block. Maybe one way to do that... would be to make "hide_title_on_empty_content()" check whether the user is a member of the group, and return false if so? Because if you're a group member, you'll always be able to see the Group Homepage, which means the content won't be empty.

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit d296ca3d7b01089b02461f4082f4975fc7fa0166
Author: Aaron Wells <email address hidden>
Date: Mon Mar 9 10:54:15 2015 +1300

Don't ajaxify blocks that are using "hide title on empty content"

Bug 1429518

Change-Id: I816cd3bb60abb28925beab256804f16ba04100ed

Robert Lyon (robertl-9) on 2015-03-08
Changed in mahara:
status: Confirmed → Fix Committed
Changed in mahara:
status: Fix Committed → In Progress
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2015-04-17
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers