setTemplate creates invalid template record#32710
Conversation
|
@joeforjoomla as long as testing doesn't run sucessfully we are not going to merge, that's different from not caring |
|
@rdeutz as i see tests are successfully since months |
currently not |
|
@rdeutz I fixed the 3 spaces codestyle in this PR. In addition, this PR should address the comment by @SharkyKZ in #30360 (comment). It allows passing either a string (B/C) as template name, in which case parent and inheritable have default values (0 and ''). Or if $template is an object, it expects it to have inheritable and parent properties which are then assigned to the template property itself. Side note: the failing test in the #30360 don't seem related to the PR itself, but rather the test system (composer issue). Yannick |
|
I have tested this item ✅ successfully on b828804 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32710. |
|
@richard67 yes, this replaces the other PR and also adds the missing points that @SharkyKZ was pointed in there. So this is complete compared to the other PR |
|
@richard67 I was not aware of #30360 until @joeforjoomla mentioned it. It does solve the same problem, changing the same method, in a differrent way. I feel my approach is more flexible but I'd leave up that to reviewers to decide. |
|
@dgrammatiko @weeblr Thanks for your feedback. I'll close the other PR in favour of this here. |
|
@richard67 can you add a release blocker here? |
@dgrammatiko Why does that suddenly become a release blocker? @wilsonge What's your opinion? Release blocker or not? |
This PR replaced #30360 which was (or should have been RB). Anyways if this PR isn't merged is kinda hard to programmatically set a template (eg the API is broken) |
|
#30360 never had the release blocker label. |
|
I've asked for opinions in Glip in maintainers and JBS channel. Will see what they say. |
|
I have tested this item ✅ successfully on b828804 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32710. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32710. |

See issue #32709
Pull Request for Issue # .
Summary of Changes
Template record in application object now also has inheritable and parent properties which are not set by
SiteApplication::setTemplate. This causes large numbers of PHP notices to be logged in various places.Changes made is B/C, allowing either to pass in a full template definition object (with custom inheritable, params and parent props) or just the template name as a string.
Testing Instructions
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
No PHP notices.
Documentation Changes Required