? Failure
Pull Request for # 8606

User tests: Successful: Unsuccessful:

avatar AndyTheFactory
AndyTheFactory
7 Dec 2015

…Template

$app = JFactory::getApplication();
$t=$app->getTemplate(true);
var_dump($t);

results in
object(stdClass)#582 (4) {
** ["id"]=>
string(2) "7"
["home"]=>
string(1) "1"**
["template"]=>
string(10) "protostar"
["params"]=>
object[....]
}

But after a setTemplate, the same call has a different type of result

$app = JFactory::getApplication();
$app->setTemplate('beez3',null);
$t=$app->getTemplate(true);

results in
object(stdClass)#865 (2) {
["template"]=>
string(10) "rt_anacron"
["params"]=>
..........
}

avatar AndyTheFactory AndyTheFactory - open - 7 Dec 2015
avatar AndyTheFactory AndyTheFactory - change - 7 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 7 Dec 2015
Labels Added: ?
avatar AndyTheFactory
AndyTheFactory - comment - 8 Dec 2015

this is in regards to #8606

avatar brianteeman brianteeman - change - 7 Mar 2016
Category Libraries
avatar brianteeman brianteeman - change - 7 Mar 2016
Title
JApplicationSite getTemplate returns an incomplete class after a set…
JApplicationSite getTemplate returns an incomplete class after a set…
avatar wmchris wmchris - test_item - 1 Aug 2016 - Tested unsuccessfully
avatar wmchris
wmchris - comment - 1 Aug 2016

I have tested this item ? unsuccessfully on c7b60cb

Cant reproduce the problem because of missing function.

Error:
´´´php
Fatal error: Call to undefined method JApplicationAdministrator::setTemplate() in /var/www/html/joomla-hc/administrator/components/com_test/test.php on line 11
´´´


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

avatar wmchris
wmchris - comment - 1 Aug 2016

Forgot @icampus, again. Sorry :(


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

avatar mbabker
mbabker - comment - 1 Aug 2016

You need to test this with the frontend, not the backend. As you correctly pointed out, the admin app doesn't have this API method but the frontend app does.

avatar renekreijveld renekreijveld - test_item - 4 Nov 2016 - Tested unsuccessfully
avatar renekreijveld
renekreijveld - comment - 4 Nov 2016

I have tested this item ? unsuccessfully on c7b60cb

I write a small system plugi that onAfterRoute() changes templates. Tested in the frontend:

$app = JFactory::getApplication();
$template = $app->getTemplate(true);
var_dump(expression)($template);

produces:

/Users/rkr/Development/Projects/joomla-cms-staging/plugins/system/forcetemplate/forcetemplate.php:16:
object(stdClass)[174]
public 'id' => string '7' (length=1)
public 'home' => string '1' (length=1)
public 'template' => string 'protostar' (length=9)
public 'params' =>
object(Joomla\Registry\Registry)[567]
protected 'data' =>
object(stdClass)[568]
public 'templateColor' => string '' (length=0)
public 'logoFile' => string '' (length=0)
public 'googleFont' => string '1' (length=1)
public 'googleFontName' => string 'Open+Sans' (length=9)
public 'fluidContainer' => string '0' (length=1)
public 'separator' => string '.' (length=1)

If I alter the plugin with this code:

$app = JFactory::getApplication();
$app->setTemplate('beez3',null);
$template = $app->getTemplate(true);
var_dump($template);

it produces:

/Users/rkr/Development/Projects/joomla-cms-staging/plugins/system/forcetemplate/forcetemplate.php:17:
object(stdClass)[550]
public 'template' => string 'beez3' (length=5)
public 'params' =>
object(Joomla\Registry\Registry)[560]
protected 'data' =>
object(stdClass)[561]
public 'separator' => string '.' (length=1)


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

avatar roland-d roland-d - edited - 4 Nov 2016
avatar roland-d roland-d - change - 4 Nov 2016
Rel_Number 0 8606
Relation Type Pull Request for
avatar roland-d
roland-d - comment - 4 Nov 2016

@AndyTheFactory Can you have a look at the unsuccessful tests and see if and where your code may need updating?

avatar mbabker
mbabker - comment - 21 May 2017

Can this PR be updated to be in sync with the current development branches and address the issues noted above?

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 May 2017
Status Pending Information Required
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 27 May 2017

If this PR get no Response, it will be closed at 22. June 2017.


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Jun 2017
Status Information Required Closed - No Reply
Closed_Date 0000-00-00 00:00:00 2017-06-22 03:55:46
Closed_By franz-wohlkoenig
avatar joomla-cms-bot joomla-cms-bot - edited - 22 Jun 2017
avatar joomla-cms-bot joomla-cms-bot - close - 22 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Jun 2017

closed as stated above.


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

avatar joomla-cms-bot
joomla-cms-bot - comment - 22 Jun 2017

Add a Comment

Login with GitHub to post a comment