?
Related to # 12499
avatar csiteru
csiteru
4 Nov 2016

Steps to reproduce the issue

Hi!
My post from this tread: #12688
I found the bug why the template style always is set default on my site on j3.6.4.
When SEF is off, in https://github.com/joomla/joomla-cms/blob/5b4816f32aa4f773a78ae4d302dd4c38dff9d8f5/libraries/cms/application/site.php#L440 is set right ItemId and template is set right. But is SEF is ON, This function returns 0 and $id set = 0 in line 448 ($id = $item->template_style_id). Thats why
$template = $templates[$id]; is always = 0, and template style set defaunt.
https://github.com/joomla/joomla-cms/blob/5b4816f32aa4f773a78ae4d302dd4c38dff9d8f5/libraries/cms/application/site.php#L506

Expected result

Actual result

System information (as much as possible)

Joomla 3.6.4 php7, php5.6
when downgrade to 3.6.2 - all is OK.

Additional comments

http://www.screencast.com/t/U8lHx2ACh8S - video

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
4.00

avatar csiteru csiteru - open - 4 Nov 2016
avatar joomla-cms-bot joomla-cms-bot - change - 4 Nov 2016
Labels Added: ?
avatar brianteeman
brianteeman - comment - 4 Nov 2016

What is that file you are editing. it doesnt look like any core file. Also its hard to tell but it looks like all the problems are with a component called and not with something from the core like com_content


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

avatar csiteru
csiteru - comment - 5 Nov 2016

It's problem on file: /libraries/cms/application/site.php

avatar mahagr
mahagr - comment - 7 Nov 2016

This may be the same issue: #12499

Basically after updating Joomla, all component routers are being loaded. Many of the routers in extensions were/are badly written (have code outside of the functions) and cause default style to be loaded. This happens because of some Joomla methods get called before they have been properly initialized.

avatar csiteru
csiteru - comment - 7 Nov 2016

@mahagr You right, but in joomla 4.6.2 all works well....

avatar mahagr
mahagr - comment - 7 Nov 2016

The issue appears once you update Joomla to 3.6.3 or later.

avatar ggppdk
ggppdk - comment - 7 Nov 2016

@mahagr

do you mean that some component routers are modifying the value of 'Itemid' just because they get loaded?

avatar mahagr
mahagr - comment - 7 Nov 2016

@ggppdk Most broken components I've seen have includes in the router file which end up running some code -- usually initializing some variables or loading some javascript files for the component. The reason why those break template assignments is that they (eventually) end up calling $app->getTemplate() before Joomla has decided which template style it should be using.

Basically this causes the above call to always select default template style. See the link in the issue description, that's where it happens.

Also please read the long discussion inside issue #12499.

avatar leetempest
leetempest - comment - 10 Nov 2016

I have the same issue, using a redirect on login to 'members' area with a different menu in the template but the default template is loaded with SEO on. When I turn off core SEO settings its all works fine and loads and displays the correct templates. Using latest Joomla and T3 Framework template.

avatar mahagr
mahagr - comment - 10 Nov 2016

@leetempest To fix the issue, see #12499.

avatar leetempest
leetempest - comment - 10 Nov 2016

mahagr,
Thanks for the reply, Unfortunately I'm not a PHP developer :-(. I'm struggling to find the fix mentioned in the post you linked too. Is this related to the T3 Framework plugin / template or Joomla code?

avatar brianteeman
brianteeman - comment - 10 Nov 2016

Is this related to the T3 Framework plugin / template

Almost certainly

On 10 November 2016 at 15:46, Lee Tempest notifications@github.com wrote:

mahagr,
Thanks for the reply, Unfortunately I'm not a PHP developer :-(. I'm
struggling to find the fix mentioned in the post you linked too. Is this
related to the T3 Framework plugin / template or Joomla code?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#12755 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8YP1rZRDjXbfRkMJ3D45OYtKqQx-ks5q8y5cgaJpZM4Kp3RF
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar mahagr
mahagr - comment - 10 Nov 2016

If T3 worked before and not after Joomla update, I would say that its not to blame -- otherwise it would have been broken before. I would make a copy of the site and remove 3rd party components one by one until the assignments work again. Right now there's no other way as there's a bug in the new logic that causes this (there's already fix, its just not released) which basically makes it not possible to just disable components to see which one caused it.

avatar brianteeman
brianteeman - comment - 10 Nov 2016

You can't say that. From repeated experience t3 has broken with almost every minor release.

avatar GitHub2022
GitHub2022 - comment - 2 Feb 2017

I am experience the exactly the same problem with a standard joomla installation. What is the solution? Is there somebody who is trying to fix it?


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

avatar mahagr
mahagr - comment - 3 Feb 2017

There are many possible causes on why template styles aren't working. Please read my comments and follow the links in them. The issue is always either a badly written plugin or badly written component router.

avatar nibra nibra - change - 16 Mar 2017
Category Router / SEF
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2017
Rel_Number 0 12499
Relation Type Related to
avatar franz-wohlkoenig franz-wohlkoenig - change - 5 Apr 2017
Status New Discussion
avatar brianteeman
brianteeman - comment - 21 May 2017

I am closing this as a non core issue. Keeping this open isnt going to help as there is nothing that can be done in the core

avatar brianteeman brianteeman - close - 21 May 2017
avatar brianteeman brianteeman - change - 21 May 2017
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2017-05-21 15:06:24
Closed_By brianteeman

Add a Comment

Login with GitHub to post a comment