K2 & Joomla 3.0 with Startup theme error

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sun Nov 11, 2012 3:55 am
Reply with quote
Report this post
Hey

Just noticed if I try to access any of the K2 pages, adress examples:
1.) http://www.mysite.com/index.php/k2
2.) http://www.mysite.com/index.php/k2/categories

I get the following error message:
Fatal error: Call to undefined method JDate::toFormat() in /home/polygram/public_html/components/com_k2/helpers/route.php on line 94

The line in question is:
Code: Select all
 {
                $datenow = JFactory::getDate();
                $alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");[<--THIS LINE: 94]
            }


Any ideas?

My server info:
PHP Version 5.3.8
Web Server Apache
WebServer to PHP Interface cgi-fcgi
Joomla! Version Joomla! 3.0.1 Stable [ Ember ] 09-October-2012 14:00 GMT
Joomla! Platform Version Joomla Platform 12.2.0 Stable [ Neil Armstrong ] 21-September-2012 00:00 GMT
User avatar
Fresh Boarder

GK User
Sun Nov 11, 2012 6:48 pm
Reply with quote
Report this post
I've managed to resolve this problem by changing the following line 94, from this:

Code: Select all
 {
                $datenow = JFactory::getDate();
                $alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");[<--THIS LINE: 94]
            }


To This:

Code: Select all
 {
                $datenow = JFactory::getDate();
                $alias = $datenow->Format("%Y-%m-%d-%H-%M-%S");[<--THIS LINE: 94]
            }


It seems to resolve the error, just not sure if its the best way to do so :dry: ?
User avatar
Fresh Boarder


cron