-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix FileLayout to work in non Web context, like Cli, Api #38585
Conversation
I have tested this item ✅ successfully on eb5a5bf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
1 similar comment
I have tested this item ✅ successfully on eb5a5bf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
I have tested this item 🔴 unsuccessfully on eb5a5bf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
@brianteeman Why the unsuccessful test? What hasn't worked? |
I have tested this item ✅ successfully on eb5a5bf This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
I have not tested this item. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
@brianteeman that error do not related to |
I see the remaining issue is covered by another PR #39550 , so this PR here seems to be complete. See comment here: #38650 (comment) . |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38585. |
Thank you for your work, Fedik! |
Fix for stuff like #38222 and #38214 .
Summary of Changes
FileLayout is fail to be render in non Web context, because it does not have a template, obviously.
I changed FileLayout class, so it will ignore the template in non Web context if it not provided within the options.
Testing Instructions
Create file
layouts/potato.php
with content:Add layout rendering:
Around here
joomla-cms/libraries/src/Console/CleanCacheCommand.php
Line 73 in dd91072
Then from console run
php cli/joomla.php cache:clean
Actual result BEFORE applying this Pull Request
an error: getTemplate undefined
Expected result AFTER applying this Pull Request
No error, you should see extra message from
potato
layoutDocumentation Changes Required
Probably. FileLayout support
template
option, that should be a template name.