[4.3] Add support for namespaced template helper (com_ajax) #39521
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.
Pull Request for Issue # .
Summary of Changes
The PR #39011 introduced namespace to the templates. This obviously solves the Fields problem but there is one more that needs to be tackled:
com_ajax.This PR is using the existing conventions but allows to load the namespaced helper
Testing Instructions
Existing functionality Front end templates
helper.phpin thetemplates\cassiopeiafolder with the following contentindex.php?option=com_ajax&method=template&format=json&template=cassiopeiaand you should have a message:{"success":true,"message":null,"messages":null,"data":{"is":true,"namespaced":false}}Proposed code
<namespace path="src">Joomla\Template\Cassiopeia</namespace>to the templateDetails.xml of Cassiopeiaadministrator/cache/autoload_psr4.phptemplates/cassiopeia/src/Helper/AjaxHelper.phpwith the following contents:index.php?option=com_ajax&method=template&format=json&template=cassiopeiaand you should have a message:{"success":true,"message":null,"messages":null,"data":{"is":true,"namespaced":true}}Existing functionality Back end templates
helper.phpin theadministrator/templates/atumfolderadministrator/index.php?option=com_ajax&method=template&format=json&template=atumand you should have a message:{"success":true,"message":null,"messages":null,"data":{"is":true,"namespaced":false}}Proposed code
<namespace path="src">Joomla\Template\Atum</namespace>to the templateDetails.xml of the Atum templateadministrator/cache/autoload_psr4.phpadministrator/templates/atum/src/Helper/AjaxHelper.phpwith the following contents:administrator/index.php?option=com_ajax&method=template&format=json&template=atumand you should have a message:{"success":true,"message":null,"messages":null,"data":{"is":true,"namespaced":true}}Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Requesting a review from @HLeithner @laoneo @wilsonge