Support Center

Recent questions

About Koken

This Help Center provides support for Koken, a free content management system designed for photographers, artists and designers.

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Strange behavior of koken:time Lens-Tag

Tim Dohle

Dec 16, 2014 08:06PM EST


I've been using koken for a while now and it is great! I use the regale 2 theme but have a weird problem with the content-page…

First of all, I made some small adjustments, so that the alignment of the elements fits my needs. But that included just removing some divs and rearranging some of the lens-tags.

Unfortunately I don't know if the following error occured before that, but I think it did… It's pretty strange.

When I open a URL to a specific picture (e.g., the date is shown relative. The same if I reload the page.
But if I now go back and forth, the date is shown the right way - as an absolute date. In the source-code the tag is just written in the default way:
<koken:time />

I also tried adding the options to it, but nothing helped:
<koken:time data="{{ content.captured_on }}" relative="false" />

The strange part is, that if a page was already loaded and the content-page is loaded dynamically, the date is shown correctly. Only if I directly open the deep-link to the picture, the date is shown relative.

I also tried going deeper into the code and looked at the time() function in /app/site/Koken.php… At the end of this function the code is echoed, so I modified the output before $text, to look if I am in the right function (kind of like a debug output to check whether I am on the right way in your code).
And now I am even more confused! Again, everytime I open the page directly it simply shows the relative date and if I paginate, or open the picture from the grid it shows the absolute date including my "mark" that I put in the code.
It seems if the <time>-Tag is modified afterwards by JS or something, otherwise it would have to show the output that I hardcoded into the Koken-Core, wouldn't it?! So I don't think it has to do with the realtive-option of the time Lens-Tag, but something else…

Do you have any Idea how I can fix this? Or can you reproduce this on your side?

Thank you and best regards,
Tim D.

This question has received the maximum number of answers.
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
Invalid characters found