Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Jean
  2. F2C article templating
  3. Monday, 23 September 2013
  4.  Subscribe via email
Hello F2C,

When a user submits an article on 31st December (any year), the article's created date shows up as 1st January the following year.

To give an example: An article was submitted on 31-12-2012, but shows up as 01-01-2013.

I'm using Joomla 2.5.14 and Form2Content Pro 4.6.0.

I would welcome any suggestions/ideas.

Many thanks,
Jean
Accepted Answer
Jean Accepted Answer Pending Moderation
Hi Julien,

I seem to have found the problem.

In my intro template, I had: {$JOOMLA_CREATED_RAW|date_format:"%e %b %Y"}.

Originally, when I first created the intro template, I used this article in the documentation as a guide for displaying the created date.

I noticed the created date was wrong in the intro template only and displayed correctly everywhere else.

After changing the %e in {$JOOMLA_CREATED_RAW|date_format:"%e %b %Y"} to %d, the date displayed correctly.

This is great news, of course, as my problem is now solved.:)

What is confusing however, is that the date format in my main template is still {$JOOMLA_CREATED_RAW|date_format:"%e %b %Y"}, but it displays correctly. The date appears to display differently in the intro and main templates, although the date format is the same.

This might help someone else in future.

Thanks for all your help and for taking the time to download & test the site, Julien.

Regards
Responses (10)
Julien Accepted Answer Pending Moderation
Hello Jean,

I tried to reproduce this issue, but I couldn't accomplish that.

Does it happen in the front-end or the back-end?
Does the user fill the created date himself, or does the system do that?
After saving is the created date then modified to the next day?

Can I see that myself on your site?

best,
Julien
  1. more than a month ago
  2. F2C article templating
  3. # 1
Jean Accepted Answer Pending Moderation
Hello Julien,

Thanks for getting back to me.


Yes, this happens on the front-end. I don't know about the back-end.
The date is entered using a date picker.
A few points re the saved date:

  1. The date changes after saving, from what I can see
  2. When I go into the F2C Article manager and change the date, the correct date is then saved and retained
  3. In a previous post of mine, I asked how to remove the time from the pre-filled input box and you sent me a hack. I don't know if this has any affect.


Here is the link to the site where you can click on 'Submit Record' at the top, register and submit a record. Your new record will then show up on the frontpage under 'Latest Records', where you can click on it.

If you need admin access, just let me know where to send you the login details.

Many thanks for your help so far!:)

Regards,
Jean
  1. more than a month ago
  2. F2C article templating
  3. # 2
Julien Accepted Answer Pending Moderation
Hello Jean,

I checked your site, but it's hard for me to see the problem and the cause. I don't think it's related to the hack in the previous post.
If you send me a back-up (Akeeba back-up prefered) I can debug this site on my local machine.
You can send the download link / credentials, etc. through our support e-mail address.

best,
Julien
  1. more than a month ago
  2. F2C article templating
  3. # 3
Jean Accepted Answer Pending Moderation
Hi Julien,

No problem, thank you very much for looking into the issue.

I'll send you the Akeeba backup ASAP.

Regards,
Jean
  1. more than a month ago
  2. F2C article templating
  3. # 4
Jean Accepted Answer Pending Moderation
Hi Julien,

I apologise if I'm being stupid, but could you confirm the support email address, please?

I can't seem to find it.

Regards,
Jean
  1. more than a month ago
  2. F2C article templating
  3. # 5
Julien Accepted Answer Pending Moderation
Hi Jean,

The address is support (at sign) opensourcedesign.nl
You can also directly send it to me, that's faster: julien (at sign) opensourcedesign.nl

best,
Julien
  1. more than a month ago
  2. F2C article templating
  3. # 6
Jean Accepted Answer Pending Moderation
Thanks Julien, I sent you an email. :)
  1. more than a month ago
  2. F2C article templating
  3. # 7
Julien Accepted Answer Pending Moderation
Hello Jean,

I think the %e is Windows only? I checked the Smarty documentation again and this was what it said:

date_format is essentially a wrapper to PHP's strftime() function. You may have more or less conversion specifiers available depending on your system's strftime() function where PHP was compiled. Check your system's manpage for a full list of valid specifiers. However, a few of the specifiers are emulated on Windows. These are: %D, %e, %h, %l, %n, %r, %R, %t, %T.

That probably explains why %e does not work in all cases.

I'm glad you found this tricky issue!

best,
Julien
  1. more than a month ago
  2. F2C article templating
  3. # 8
Jean Accepted Answer Pending Moderation
Hi Julien,

I also read that %e is Windows only, so that must be it.

Thanks again for your help, I can sleep now!;)

Regards,
Jean
  1. more than a month ago
  2. F2C article templating
  3. # 9
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.