0

I got a call from a client about an issue with xMap component on Joomla 3.3.6. The client wanted to create a menu item for each sitemap, but he was not able to select the desired sitemap from the modal window.

Setting error_reporting on, the modal displays this error message:

Fatal error: Call to undefined method JDate::toFormat() in /home/myaccount/public_html/administrator/components/com_xmap/views/sitemaps/tmpl/modal.php on line 110

How to fix this?

0

The JDate::toFormat() method is deprecated in recent Joomla 3 versions. Current method is JDate::format().

To fix this, you need to edit the XMap's modal.php template file, that is located in

/administrator/components/com_xmap/views/sitemaps/tmpl/

Then around line 110 replace the line:

$xmlDate = $date->toFormat('%Y-%m-%d %H:%M');

to

$xmlDate = $date->format('%Y-%m-%d %H:%M');

Hopefully the developer will fix this bug with a future release.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.