Beez3 template breaks parameter injection pulling params from JFactory #11825
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
When the application renders the template, it injects the template parameters into the
JDocument
instance. However, onlyJDocumentHtml
actually stores a parameters reference. Since our templates are in scope ofJDocument
(aside from theerror.php
layout all of them are in scope ofJDocumentHtml
), the template should reference the injected parameters instead of issuing another call toJFactory
to fetch the data. By doing so, this breaks parameter injection by not using the injected data.Testing Instructions
The Beez3 template should continue to work with its configured parameters.
Documentation Changes Required
It should be made clear what data is made available when a template file is included in the scope of
JDocumentHtml
and the examples updated to support this practice.