Upgrade to Joomla 2.5.7 - mod_title.php error

The support for Joomla 2.5 ended on December 31, 2014. Possible bugs in Joomla 2.5 will not be patched anymore. This forum has been closed. Please update your website to Joomla 3.x

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Locked
clouder
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Sep 15, 2012 9:45 am

Upgrade to Joomla 2.5.7 - mod_title.php error

Post by clouder » Sat Sep 15, 2012 9:56 am

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!

HarryH
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Sep 17, 2012 3:44 pm

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by HarryH » Mon Sep 17, 2012 3:52 pm

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.

User avatar
humvee
Joomla! Master
Joomla! Master
Posts: 14704
Joined: Wed Aug 17, 2005 10:27 pm
Location: Kent, England

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by humvee » Tue Sep 18, 2012 6:21 pm

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.

bosit
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Sep 20, 2012 10:37 am

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by bosit » Thu Sep 20, 2012 10:41 am

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 :)

clouder
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Sat Sep 15, 2012 9:45 am

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by clouder » Thu Sep 20, 2012 2:53 pm

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?

User avatar
LowNotesB
Joomla! Apprentice
Joomla! Apprentice
Posts: 35
Joined: Sun Feb 18, 2007 12:20 am
Location: on top of the mountain

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by LowNotesB » Sat Sep 29, 2012 7:46 pm

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.

prignony
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Oct 02, 2012 10:05 am

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by prignony » Tue Oct 02, 2012 10:28 am

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.

User avatar
Klementz
Joomla! Explorer
Joomla! Explorer
Posts: 400
Joined: Sun Aug 28, 2005 2:55 pm
Location: Barrie, Ontario CANADA
Contact:

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by Klementz » Wed Oct 24, 2012 12:14 pm

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.
http://www.jdanielclements.com (Personal photography site)
http://www.coinzoo.net (World coin collection with animals)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44072
Joined: Sat Apr 05, 2008 9:58 pm

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by Webdongle » Wed Oct 24, 2012 1:20 pm

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
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

deleted user

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by deleted user » Thu Oct 25, 2012 3:04 am

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

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44072
Joined: Sat Apr 05, 2008 9:58 pm

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by Webdongle » Thu Oct 25, 2012 10:54 am

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 ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Klementz
Joomla! Explorer
Joomla! Explorer
Posts: 400
Joined: Sun Aug 28, 2005 2:55 pm
Location: Barrie, Ontario CANADA
Contact:

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by Klementz » Thu Oct 25, 2012 11:49 am

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
http://www.jdanielclements.com (Personal photography site)
http://www.coinzoo.net (World coin collection with animals)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44072
Joined: Sat Apr 05, 2008 9:58 pm

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by Webdongle » Thu Oct 25, 2012 6:59 pm

If so, then perhaps it should have a tracker created for it ?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

stewart9643
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue Oct 12, 2010 2:38 am

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by stewart9643 » Tue Oct 30, 2012 5:36 am

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

yaanimai
Joomla! Explorer
Joomla! Explorer
Posts: 359
Joined: Thu Jun 14, 2007 2:48 pm
Location: Coppell, Texas
Contact:

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by yaanimai » Sun Jan 27, 2013 3:14 am

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?

tschumler
Joomla! Ace
Joomla! Ace
Posts: 1500
Joined: Fri Sep 29, 2006 4:59 pm

Re: Upgrade to Joomla 2.5.7 - mod_title.php error

Post by tschumler » Tue Feb 05, 2013 11:41 am

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.


Locked

Return to “Joomla! 2.5 Bug Reporting”