Call to undefined method JDate::toFormat()

More
10 years 10 months ago #44006 by SubCon
Hello, I think you have a bug in your code:

I just installed latest version, and created new category, when I try to save, I get:

Fatal error: Call to undefined method JDate::toFormat() in
Code:
/***/administrator/components/com_flexicontent/tables/flexicontent_categories.php on line 202

A quick google search reveals that function "toFormat" is deprecated in Joomla 3, and it is now "Format".

I am using latest joomla 3.2.1 version.

Also just a minor thing: in the dashboard there is a version check, which shows this:
Code:
An older version of FLEXIcontent is installed Latest version: 2.1.2 r1806 Installed Version:2.1.2 r1806 beta Release date: 2013-10-19

Thanks

Please Log in or Create an account to join the conversation.

More
10 years 10 months ago #44007 by ggppdk
Hello

-- this a part of the code that is rarely executed, will commit a fix for it


-- to apply a patch now (in your installation)
edit files:

administrator/components/com_flexicontent/tables/flexicontent_categories.php
administrator/components/com_flexicontent/tables/flexicontent_items.php

and replace:
Code:
$this->alias = $datenow->toFormat("%Y-%m-%d-%H-%M-%S");
with:
Code:
$this->alias = FLEXI_J16GE ? $datenow->format($format = 'Y-M-d-H-i-s', $local = true) : $datenow->toFormat($format = '%Y-%m-%d-%H-%M-%S');

Thanks for report

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.394 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline