Page 1 of 1

Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Sat Sep 15, 2012 9:56 am
by clouder
Hi All!

I'am using the Glossary Component Glossary28J2.

I upgraded from Joomla 2.5.6 to 2.5.7 which leads to the following error message when switching to the glossary menu in the backend:

Notice: Undefined property: JAdministrator::$JComponentTitle in /home/www/web223/html/Joomla/administrator/modules/mod_title/mod_title.php on line 13

The code says the following at line 13:

// Get the component title div
$title = JFactory::getApplication()->JComponentTitle;

With 2.5.6 this message never appeared.

I'am not a php professional, so please could anyone of you help out here?

Thanks in advance!

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Mon Sep 17, 2012 3:52 pm
by HarryH
Seems to be a typical 2.5.7 bug - There is a quick workaround that works for me.

Change the line 13:
$title = JFactory::getApplication()->JComponentTitle;

into the following:

$title = JFactory::getApplication()->get('JComponentTitle');

Good luck.

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Tue Sep 18, 2012 6:21 pm
by humvee
HarryH wrote:Seems to be a typical 2.5.7 bug - There is a quick workaround that works for me.

Change the line 13:
$title = JFactory::getApplication()->JComponentTitle;

into the following:

$title = JFactory::getApplication()->get('JComponentTitle');

Good luck.
If this a bug that you are certain exists then you should place a notification to the 2.5. Bug Forum / 2.5. Bug Tracker with full details. If it has already been reported please quote the Bug Tracker reference so that people can follow official developments on it.

As it would seem to be a limited number of instances that are occurring then it is less likely to be a bug but a server/installation configuration issue and editing the core files of Joomla with anything other than an approved temporary fix notice issued by the developers is a dangerous path to follow, particularly for an inexperienced/non-developer user and is not recommended.

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Sep 20, 2012 10:41 am
by bosit
Exact same error here, running a Linux debian server with Nginx v1.2.3, MySQL 5.1.58, and PHP 5.3.15
Updated using the 2.5.6 to 2.5.7 package from the extension manager

HarryH's fix worked fine, thanks for that :)

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Sep 20, 2012 2:53 pm
by clouder
i agree with bosit's feedback. worked for me too! thanks harryh!

just checked that this glossary component is not working for multilanguage sites.

is there a way to get an english glossary for the EN website- and a german glossary for the DE website version?

so far, it seems only the SEO Glossary component supports that, but its a commercial version.

any known workarounds?

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Sat Sep 29, 2012 7:46 pm
by LowNotesB
I'm getting the same error when I try to run extplorer from the backend.

Notice: Undefined property: JAdministrator::$JComponentTitle in /home/xxxxxx/public_html/administrator/modules/mod_title/mod_title.php on line 13

the suggested fix above took away the error message, but the component still fails to load fully and then goes into some kind of loading loop that doesn't stop.

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Tue Oct 02, 2012 10:28 am
by prignony
I've the same issue, I'm going to implement your solution, thanks you :)

It happened when I installed the hello_world joomla development component on the version 2.5.7 of joomla.

I've a cloud site hosting on rackspace.

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Wed Oct 24, 2012 12:14 pm
by Klementz
I am also experiencing the same error with eXtplorer:

Notice: Undefined property: JAdministrator::$JComponentTitle in /[path]/administrator/modules/mod_title/mod_title.php on line 13

It is not a server configuration issue, because I have another site on the same server with the same .htaccess settings and the same firewall configuration settings and the component works fine there.

eXtplorer is the only component that I am having this problem with.

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Wed Oct 24, 2012 1:20 pm
by Webdongle
I suspect that it is deprecated(or badly written) code in the 3rd party extension that triggers the error.

It looks like the Joomla file is written to prevent the code(of 3rd party extensions) using unsanitised database requests. If that is the case then editing the Joomla file could leave your site open to sql injection.

I have raised the issue on the bugsquad mailing list. And hopefully one of the Joomla developers will look at it soon.

Addendum
The Joomla devs say
JApplication no longer extends JObject which had the get method. So, the code is right

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Oct 25, 2012 3:04 am
by deleted user
A proper fix would be for us to check if JComponentTitle is set before storing it in that variable, and if it isn't, then making the variable an empty string. So, something like this should work:

Code: Select all

if (isset(JFactory::getApplication()->JComponentTitle))
{
	$title = JFactory::getApplication()->JComponentTitle;
}
else
{
	$title = '';
}
That variable is only set to the application via JToolbarHelper::title() or the developer explicitly setting that value. An advantage to the old way was that it would mask the error of the JComponentTitle variable not being set by automatically returning the empty string.

As far as any potential security issues with mod_title, since it should only be set by the helper method to get the proper rendering, unless the request data is being explicitly used by a developer without proper sanitization first (meaning using JInput or JRequest), then and only then would there exist a chance at any unwanted activity on your site while trying to set the title to display in the page. Typical use of the helper method doesn't use the request data at all; the most complicated use in the core code is using data already retrieved from the database in if conditionals to set a proper string, otherwise, the title is a simple language key. See this example from the 2.5 code base (which is the same in 3.0) - https://github.com/joomla/joomla-cms/bl ... ml.php#L67

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Oct 25, 2012 10:54 am
by Webdongle
mbabker wrote:A proper fix would be for us to check if JComponentTitle is set before storing it in that variable, and if it isn't, then making the variable an empty string. So, something like this should work:

Code: Select all

if (isset(JFactory::getApplication()->JComponentTitle))
{
	$title = JFactory::getApplication()->JComponentTitle;
}
else
{
	$title = '';
}
...
Where would that fix be placed ?

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Oct 25, 2012 11:49 am
by Klementz
Webdongle wrote:
mbabker wrote:A proper fix would be for us to check if JComponentTitle is set before storing it in that variable, and if it isn't, then making the variable an empty string. So, something like this should work:

Code: Select all

if (isset(JFactory::getApplication()->JComponentTitle))
{
	$title = JFactory::getApplication()->JComponentTitle;
}
else
{
	$title = '';
}
...
Where would that fix be placed ?
/administrator/modules/mod_title/mod_title.php

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Thu Oct 25, 2012 6:59 pm
by Webdongle
If so, then perhaps it should have a tracker created for it ?

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Tue Oct 30, 2012 5:36 am
by stewart9643
Have the same issue with extplorer, looping and all. Also with CE Contacts, and I know that Fox Contacts has the same problem. Also with OSEFileman.

PHP Built On Linux php-shared-1 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64
Database Version 5.5.27-rel28.1
Database Collation utf8_general_ci
PHP Version 5.3.14
Web Server LiteSpeed
WebServer to PHP Interface litespeed
Joomla! Version Joomla! 2.5.7 Stable [ Ember ] 13-September-2012 14:00 GMT
Joomla! Platform Version Joomla Platform 11.4.0 Stable [ Brian Kernighan ] 03-Jan-2012 00:00 GMT
User Agent Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Sun Jan 27, 2013 3:14 am
by yaanimai
I am getting the same error with extplorer on one site. I have it installed on several other sites on the same server with no problems.

I have tried both changes above to the
/administrator/modules/mod_title/mod_title.php file. The error goes away but the
extplorer doesn't load the files. It just has a spinning wheel.

Has anyone else figured this out?

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Posted: Tue Feb 05, 2013 11:41 am
by tschumler
I am getting this error message now on Joomla 2.5.9 after upgrading from Joomla 2.5.8.
Extplorer worked fine with Joomla 2.5.8 and is still working fine on my other websites, which I have not updated to Joomla 2.5.9 yet. I am not a programmer but would be interested to know if above mentioned changes would work in Joomla 2.5.9 and be save to apply.