Opened 8 years ago
Closed 8 years ago
#7689 closed defect (bug) (fixed)
Non-standard 'template' loading broken in Nouveau.
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.0 | Priority: | normal |
| Severity: | major | Version: | |
| Component: | Templates | Keywords: | has-patch needs-testing |
| Cc: |
Description
The changes in [11821] broke the loading of some AJAX templates in Nouveau. Specifically, the backward compatibility in [11821] was focused only on the 'group_members' special case from bp-legacy. But Nouveau was using the 'template' parameter in a couple of additional places: group requests, friend lists, user notifications. As a result, AJAX loading no longer works for these items (it generates a fatal error due to an attempt to load_template( '' )).
I'll follow up in a moment with a proposed fix.
Attachments (1)
Change History (7)
#2
@
8 years ago
I did think that might break things! I put it in for consistency during 2.9.3. Thanks for working on it.
I think the changes are much more readable, and next week, I should be able to test it for you.
#4
@
8 years ago
- Owner set to DJPaul
- Status changed from new to assigned
I'll commit this next week unless someone gets to it before me.
7689.diff attempts to fix this by introducing a bit more standardization to the way that custom templates are requested via AJAX. Before [11821], you would pass a template *path*. I've changed it so that you now pass (optionally) a template *label*, which could be
group_members,group_requests,member_notifications, etc. When the AJAX handler sees thistemplate, it assumes that this is a special case and loads the correct template. Iftemplateis absent, it loads$object/$object-loop, as before.I think that this change makes the process a little bit easier to reason about than introducing more
$objectmagic in the AJAX handler. Can I get a second set of eyes (and a bit of testing)?