Version 3.7.2 (we are trying to update to it from 3.6.2)
Put a default template.
Choose a Menu item and put another template as its template style.
Using SEF for the site.
When accessing the menu item alias, it should change the template to the one assigned to the menu item.
Only the default template is displayed.
Debugging the code, it seems that the getTemplate function at libraries/cms/application/site.php is being called BEFORE the parseSefRoute function at /libraries/cms/router/site.php.
But for the getTemplate function to work properly it depends on the parseSefRoute function having already assigned what is the active Menu Item.
Labels |
Added:
?
|
Status | New | ⇒ | Information Required |
Build | staging | ⇒ | 3.7.2 |
Category | ⇒ | com_menus Templates (site) |
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:106]
#1 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#2 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#3 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#4 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#5 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#6 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#7 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#8 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/libraries/cms/html/html.php:359]
#1 JHtml::includeRelativeFiles(js, jui/jquery.min.js, 1, 1, ) called at [/var/www/html/joomla/libraries/cms/html/html.php:706]
#2 JHtml::script(jui/jquery.min.js, Array ([version] => auto,[relative] => 1,[detectDebug] => ))
#3 call_user_func_array(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery.min.js,[1] => Array ([version] => auto,[relative] => 1,[detectDebug] => ))) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#4 JHtml::call(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery.min.js,[1] => Array ([version] => auto,[relative] => 1,[detectDebug] => ))) called at [/var/www/html/joomla/libraries/cms/html/html.php:140]
#5 JHtml::(script, jui/jquery.min.js, Array ([version] => auto,[relative] => 1,[detectDebug] => )) called at [/var/www/html/joomla/libraries/cms/html/jquery.php:52]
#6 JHtmlJquery::framework()
#7 call_user_func_array(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#8 JHtml::call(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:140]
#9 JHtml::(jquery.framework) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:23]
#10 JuloaLib::loadJquery() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:164]
#11 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#12 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#13 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#14 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#15 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#16 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#17 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#18 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/libraries/cms/html/html.php:359]
#1 JHtml::includeRelativeFiles(js, jui/jquery-noconflict.js, 1, 1, 1) called at [/var/www/html/joomla/libraries/cms/html/html.php:706]
#2 JHtml::script(jui/jquery-noconflict.js, Array ([version] => auto,[relative] => 1))
#3 call_user_func_array(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery-noconflict.js,[1] => Array ([version] => auto,[relative] => 1))) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#4 JHtml::call(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery-noconflict.js,[1] => Array ([version] => auto,[relative] => 1))) called at [/var/www/html/joomla/libraries/cms/html/html.php:105]
#5 JHtml::(script, jui/jquery-noconflict.js, Array ([version] => auto,[relative] => 1)) called at [/var/www/html/joomla/libraries/cms/html/jquery.php:57]
#6 JHtmlJquery::framework()
#7 call_user_func_array(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#8 JHtml::call(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:140]
#9 JHtml::(jquery.framework) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:23]
#10 JuloaLib::loadJquery() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:164]
#11 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#12 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#13 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#14 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#15 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#16 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#17 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#18 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/libraries/cms/html/html.php:359]
#1 JHtml::includeRelativeFiles(js, jui/jquery-migrate.min.js, 1, 1, ) called at [/var/www/html/joomla/libraries/cms/html/html.php:706]
#2 JHtml::script(jui/jquery-migrate.min.js, Array ([version] => auto,[relative] => 1,[detectDebug] => ))
#3 call_user_func_array(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery-migrate.min.js,[1] => Array ([version] => auto,[relative] => 1,[detectDebug] => ))) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#4 JHtml::call(Array ([0] => JHtml,[1] => script), Array ([0] => jui/jquery-migrate.min.js,[1] => Array ([version] => auto,[relative] => 1,[detectDebug] => ))) called at [/var/www/html/joomla/libraries/cms/html/html.php:105]
#5 JHtml::(script, jui/jquery-migrate.min.js, Array ([version] => auto,[relative] => 1,[detectDebug] => )) called at [/var/www/html/joomla/libraries/cms/html/jquery.php:63]
#6 JHtmlJquery::framework()
#7 call_user_func_array(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:233]
#8 JHtml::call(Array ([0] => JHtmlJquery,[1] => framework), Array ()) called at [/var/www/html/joomla/libraries/cms/html/html.php:140]
#9 JHtml::(jquery.framework) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:23]
#10 JuloaLib::loadJquery() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:164]
#11 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#12 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#13 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#14 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#15 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#16 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#17 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#18 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/libraries/juloalib/Lib.php:280]
#1 JuloaLib::getTemplateOverridePath(media:/juloalib/js/jquery.min.js, ) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:193]
#2 JuloaLib::getAltPaths(media://juloalib/js/jquery.min.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:127]
#3 JuloaLib::parsePath(media://juloalib/js/jquery.min.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:92]
#4 JuloaLib::addJS(media://juloalib/js/jquery.min.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:24]
#5 JuloaLib::loadJquery() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:164]
#6 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#7 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#8 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#9 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#10 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#11 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#12 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#13 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/libraries/juloalib/Lib.php:280]
#1 JuloaLib::getTemplateOverridePath(media:/juloalib/js/fullnoconflict.js, ) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:193]
#2 JuloaLib::getAltPaths(media://juloalib/js/fullnoconflict.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:127]
#3 JuloaLib::parsePath(media://juloalib/js/fullnoconflict.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:92]
#4 JuloaLib::addJS(media://juloalib/js/fullnoconflict.js) called at [/var/www/html/joomla/libraries/juloalib/Lib.php:25]
#5 JuloaLib::loadJquery() called at [/var/www/html/joomla/components/com_adsmanager/lib/core.php:164]
#6 require_once(/var/www/html/joomla/components/com_adsmanager/lib/core.php) called at [/var/www/html/joomla/components/com_adsmanager/router.php:13]
#7 require_once(/var/www/html/joomla/components/com_adsmanager/router.php) called at [/var/www/html/joomla/libraries/cms/router/site.php:787]
#8 JRouterSite->getComponentRouter(com_adsmanager) called at [/var/www/html/joomla/libraries/cms/router/site.php:125]
#9 JRouterSite->parse(JUri Object ([] => https://joomla-local.desenv.stm/login,[] => https,[] => joomla-local.desenv.stm,[] => ,[] => ,[] => ,[] => login,[] => ,[] => ,[] => Array ())) called at [/var/www/html/joomla/libraries/cms/application/cms.php:1142]
#10 JApplicationCms->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:779]
#11 JApplicationSite->route() called at [/var/www/html/joomla/libraries/cms/application/site.php:215]
#12 JApplicationSite->doExecute() called at [/var/www/html/joomla/libraries/cms/application/cms.php:265]
#13 JApplicationCms->execute() called at [/var/www/html/joomla/index.php:49]
getTemplate
parseSefRoute 1parseSefRoute 6parseSefRoute 8parseSefRoute 10parseSefRoute 13parseSefRoute 14parseSefRoute 15#0 JApplicationSite->getTemplate() called at [/var/www/html/joomla/plugins/system/t3/includes/core/t3.php:280]
#1 T3::detect() called at [/var/www/html/joomla/plugins/system/t3/t3.php:81]
#2 plgSystemT3->onAfterRoute()
Uninstalling com_adsmanager solves the issue! Thanks a lot!
Each of those stack traces tells me that the com_adsmanager
component is loading media during the routing step and that's causing your problem.
https://github.com/joomla/joomla-cms/blob/bcfbfa06cbbaf0bca663e9162add281cd1e2a975/libraries/cms/application/site.php#L165 is core's first legitimate call to that method if routing determined the request is for a HTML page, https://github.com/joomla/joomla-cms/blob/bcfbfa06cbbaf0bca663e9162add281cd1e2a975/libraries/cms/component/helper.php#L308 would be the first call for non-HTML pages (though that one gets called on all requests anyway).
So, they need to change where their media is being loaded.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-22 14:36:36 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_Date | 2017-06-22 14:36:36 | ⇒ | 2017-06-22 14:36:37 |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/16805
closed as no Core Issue.
Hello,
I'm the author of AdsManager. I confirm that the issue was due to a old version of AdsManager.
Since AdsManager 3.1.7 (december 2016) the bug has been fixed. We are now 3.1.11
The bug appears with adsmanager < 3.1.7 and Joomla 3.6.3 +
You should always used latest version of third party component. for bug fixes. and when upgrading to recent joomla version, it's also important to be sure to don't have any regression.
Glad to hear this is resolved
Can you post a stack trace with the first call to the
getTemplate()
method? Just on a quick scan, nothing in core calls that method before the request has been routed (during routing is whenparseSefRoute()
should get called), so I suspect there's a plugin triggering something too early in play here.