? ? Pending

User tests: Successful: Unsuccessful:

avatar Fedik
Fedik
24 Aug 2022

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:

<?php
echo 'Layout works!';

Add layout rendering:

$symfonyStyle->success(\Joomla\CMS\Layout\LayoutHelper::render('potato'));

Around here

$symfonyStyle->success('Cache cleaned');

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 layout

Documentation Changes Required

Probably. FileLayout support template option, that should be a template name.

avatar Fedik Fedik - open - 24 Aug 2022
avatar Fedik Fedik - change - 24 Aug 2022
Status New Pending
avatar Fedik Fedik - change - 24 Aug 2022
Title
Fix FileLayout to work in non Web context
Fix FileLayout to work in non Web context, like Cli, Api
avatar Fedik Fedik - edited - 24 Aug 2022
avatar joomla-cms-bot joomla-cms-bot - change - 24 Aug 2022
Category Libraries
avatar Fedik Fedik - change - 24 Aug 2022
Labels Added: ?
8471c7e 24 Aug 2022 avatar Fedik phpcs
eb5a5bf 24 Aug 2022 avatar Fedik phpcs
avatar brianteeman brianteeman - test_item - 2 Jan 2023 - Tested successfully
avatar brianteeman
brianteeman - comment - 2 Jan 2023

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.

avatar dgrammatiko dgrammatiko - test_item - 2 Jan 2023 - Tested successfully
avatar dgrammatiko
dgrammatiko - comment - 2 Jan 2023

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.

avatar brianteeman brianteeman - test_item - 2 Jan 2023 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 2 Jan 2023

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.

avatar richard67
richard67 - comment - 6 Jan 2023

@brianteeman Why the unsuccessful test? What hasn't worked?

avatar viocassel viocassel - test_item - 21 Jan 2023 - Tested successfully
avatar viocassel
viocassel - comment - 21 Jan 2023

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.

avatar brianteeman brianteeman - test_item - 22 Jan 2023 - Not tested
avatar brianteeman
brianteeman - comment - 22 Jan 2023

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


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

avatar Fedik
Fedik - comment - 22 Jan 2023

@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

avatar richard67
richard67 - comment - 22 Jan 2023

I see the remaining issue is covered by another PR #39550 , so this PR here seems to be complete. See comment here: #38650 (comment) .

avatar richard67 richard67 - change - 22 Jan 2023
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 22 Jan 2023

RTC


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

avatar fancyFranci fancyFranci - change - 22 Jan 2023
Labels Added: ?
avatar fancyFranci fancyFranci - close - 22 Jan 2023
avatar fancyFranci fancyFranci - merge - 22 Jan 2023
avatar fancyFranci fancyFranci - change - 22 Jan 2023
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
avatar fancyFranci
fancyFranci - comment - 22 Jan 2023

Thank you for your work, Fedik!

Add a Comment

Login with GitHub to post a comment