User tests: Successful: Unsuccessful:
Fix for stuff like #38222 and #38214 .
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.
Create file layouts/potato.php
with content:
<?php
echo 'Layout works!';
Add layout rendering:
$symfonyStyle->success(\Joomla\CMS\Layout\LayoutHelper::render('potato'));
Around here
Then from console run php cli/joomla.php cache:clean
an error: getTemplate undefined
No error, you should see extra message from potato
layout
Probably. FileLayout support template
option, that should be a template name.
Status | New | ⇒ | Pending |
Title |
|
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I have tested this item
I have tested this item
@brianteeman Why the unsuccessful test? What hasn't worked?
I have tested this item
I have not tested this item.
marking as not tested. Comment to error on this PR #38650 (comment) suggests thatb this PR is not complete
@brianteeman that error do not related to FileLayout
class which in current PR,
that about PluginHelper::getLayoutPath()
that is separated thing, the PR for it is there #39550
I see the remaining issue is covered by another PR #39550 , so this PR here seems to be complete. See comment here: #38650 (comment) .
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-01-22 13:12:33 |
Closed_By | ⇒ | fancyFranci |
Thank you for your work, Fedik!
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.