This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

v4.5 datetime format wrong
#1

Hello

After upgrading to version 4.5, I noticed that the datetime attribute of the time tag has a wrong format:

<time class="cmtx_date timeago" datetime="6 April 2023 09:59" title="">

Also, the Google Search Console started to give the error:

"Date/time not in ISO 8601 format in the field "datePublished"

Thanks for developing Commentics.

Niko
Reply
#2

Hi Niko,

Something seems odd with your installation because the demo, which is on v4.5, has the correct format:

Code:
<time class="cmtx_date cmtx_timeago" datetime="2024-02-23T13:08:20+00:00" title="23 February 2024 13:08">7 days ago</time>

Code:
<meta itemprop="datePublished" content="2024-02-23T13:08:20+00:00">

Also notice the class is 'cmtx_timeago' but on yours it's 'timeago'.

I'd go to Settings -> Layout -> Comments and save everything and then try clearing all your cache in Tools -> Clear Cache.

If that doesn't work, I think you'd need to start comparing your files with a fresh version, specifically the ones in here:
/frontend/view/default/template/comment/

Have you completed the interview?
Reply
#3

Also check to see if there are any errors happening:
https://commentics.com/faq/troubleshoot/errors

Have you completed the interview?
Reply
#4

Thank you.

Cache clearing did not help and I did not find any special in the error log.

The files in the folder /frontend/view/default/template/comment/ seem okay.

What does this folder mean: /frontend/view/default/template/main? Comment.tpl there seems to be in the format that is causing the problem.

Niko
Reply
#5

The following file isn't used anymore. In fact it doesn't even exist in a fresh installation of v4.5.
/frontend/view/default/template/main/comment.tpl

There are now two comment templates, both of which are in /frontend/view/default/template/comment/.
Which one you're using depends on your settings in Settings -> Layout -> Comments.

If your website is still using /main/comment.tpl, that suggests a problem in your /main/comments.tpl file. In that file you should have lots of lines like this:
Code:
@template comment/{{ comment_layout }}

Are you maybe using a theme that overrides that file?

Have you completed the interview?
Reply
#6

I am using a theme that is a copy of the Pacific theme modified by me. It seems that is the cause of the problem.

I checked the /main/comments.tpl file and I did not find any occurrence @template comment/{{ comment_layout }}. Should I copy comments.tpl from the default theme to my custom layout?

Reply
#7

Ah okay that explains it.

Yes you could either copy comments.tpl from the default theme to yours (if you intend to make changes to it), or delete comments.tpl from your theme so that it uses the one from the default theme (if you don't intend to make changes to it).

Have you completed the interview?
Reply
#8

Thank you. I deleted comment.tpl and the problem was solved.

It's helpful to know that I can delete files from my theme directory and Commentics uses the default files then.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by corculator
25-Feb-2012, 11:17 AM
Last Post by Looking
12-Jul-2011, 12:09 PM
Last Post by Steven
07-Jun-2011, 10:37 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)