Keyword

Problem with joomla breadcrumb and archive module

  • Daniel
  • Daniel's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109204 by Daniel
Hello, i have on a local server a web with k2 installed.
I use a archive tools module, to show the old k2 items.
On the module the dates are correct, but when i click on any month-year link of the module, even it display the right items, the breadcrumb is wrong. I allways get a month before, for example, if i click on the link January 2013, the breadcrumb is December 2012
I`m using joomla 2.5.8 and K2 2.6.2 and i found, what i think is a bug on components\com_k2\views\itemlist\view.html on line 296.
There, it changes the year-month date with an strtotime. If you dont add the day, it fails, even i dont know exactly why.
To fix it, i just add a day bigger than 1, so the new code will be

change
$date = strtotime(JRequest::getInt('year').'-'.JRequest::getInt('month'));

with:
$date = strtotime(JRequest::getInt('year').'-'.JRequest::getInt('month').'-2');

I know how to fix it, but dont know why it fails

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


Powered by Kunena Forum