? ? Pending

User tests: Successful: Unsuccessful:

avatar weeblr
weeblr
17 Mar 2021

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

Factory::getApplication()->setTemplate('new_template');

Actual result BEFORE applying this Pull Request

[17-Mar-2021 09:05:41 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:41 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 179
[17-Mar-2021 09:05:41 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Plugin\PluginHelper.php on line 61
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Plugin\PluginHelper.php on line 61
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Plugin\PluginHelper.php on line 61
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Error\Renderer\HtmlRenderer.php on line 76
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Document\Renderer\Html\MetasRenderer.php on line 130
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Document\Renderer\Html\MetasRenderer.php on line 130
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Document\Renderer\Html\MetasRenderer.php on line 134
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Document\Renderer\Html\MetasRenderer.php on line 130
[17-Mar-2021 09:05:42 UTC] PHP Notice:  Undefined property: stdClass::$parent in V:\dev\workspaces\products\src\j4\libraries\src\Application\SiteApplication.php on line 402

Expected result AFTER applying this Pull Request

No PHP notices.

Documentation Changes Required

avatar weeblr weeblr - open - 17 Mar 2021
avatar weeblr weeblr - change - 17 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Mar 2021
Category Libraries
avatar joeforjoomla
joeforjoomla - comment - 17 Mar 2021

@weeblr this is already related to this PR #30360
Nobody seems to care about fixing it

avatar rdeutz
rdeutz - comment - 17 Mar 2021

@joeforjoomla as long as testing doesn't run sucessfully we are not going to merge, that's different from not caring

avatar joeforjoomla
joeforjoomla - comment - 17 Mar 2021

@rdeutz as i see tests are successfully since months

avatar weeblr weeblr - change - 17 Mar 2021
Labels Added: ?
avatar rdeutz
rdeutz - comment - 17 Mar 2021

@rdeutz as i see tests are successfully since months

currently not

grafik

avatar weeblr
weeblr - comment - 17 Mar 2021

@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

avatar dgrammatiko dgrammatiko - test_item - 17 Mar 2021 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 17 Mar 2021

I have tested this item successfully on b828804

Thank you Yannick


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32710.

avatar richard67
richard67 - comment - 17 Mar 2021

@weeblr Does this PR here replace #30360 by fixing the same issue in a better way? Or is that PR still needed when this one here will be merged? Am asking just to be sure I understand right.

avatar dgrammatiko
dgrammatiko - comment - 17 Mar 2021

@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

avatar weeblr
weeblr - comment - 17 Mar 2021

@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.

avatar richard67
richard67 - comment - 17 Mar 2021

@dgrammatiko @weeblr Thanks for your feedback. I'll close the other PR in favour of this here.

avatar dgrammatiko
dgrammatiko - comment - 12 May 2021

@richard67 can you add a release blocker here?

avatar richard67
richard67 - comment - 12 May 2021

@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?

avatar dgrammatiko
dgrammatiko - comment - 12 May 2021

Why does that suddenly become a release blocker?

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)

avatar richard67
richard67 - comment - 12 May 2021

#30360 never had the release blocker label.

avatar richard67
richard67 - comment - 12 May 2021

I've asked for opinions in Glip in maintainers and JBS channel. Will see what they say.

avatar joomdonation joomdonation - test_item - 13 May 2021 - Tested successfully
avatar joomdonation
joomdonation - comment - 13 May 2021

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.

avatar richard67 richard67 - change - 13 May 2021
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 13 May 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/32710.

avatar rdeutz rdeutz - close - 14 May 2021
avatar rdeutz rdeutz - merge - 14 May 2021
avatar rdeutz rdeutz - change - 14 May 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-14 09:41:09
Closed_By rdeutz
Labels Added: ?

Add a Comment

Login with GitHub to post a comment