WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Invalid date (27 posts)

  1. hejeva2
    Member
    Posted 1 year ago #

    I have a custom date field added to my posts.
    After I enter a date (using the calendar popup picker)
    Let's say I choose September 14, 2012 and update the post.
    It saves the post and displays the content of the field as '1347580800' and on the front end displays 'March 14, 0800'

    This has been working until the plugin was ugraded to 1.2. Is there a fix for this or do I have to roll back to previous version.

    http://wordpress.org/extend/plugins/types/

  2. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hejeva,

    It is working fine for me. Please let me know the following.

    1) Your WordPress versions
    2) Your theme
    3) Other Pluug-ins you are using
    4) Your OS & PHP version.

    [ Signature moderated. ]

  3. hejeva2
    Member
    Posted 1 year ago #

    WordPress 3.5.1
    Theme Alyeska (child theme) from Themeblvd

    Plugins activated:
    All in One SEO Pack
    Allow PHP in Posts and Pages
    Always Remember Me
    BackupBuddy
    Contact Form 7
    Easy Privacy Policy
    Easy Theme and Plugin Upgrades
    Envato WordPress Toolkit
    Flexi Quote Rotator
    Google Custom Search
    Google XML Sitemaps
    HeadSpace2
    Page Security by Contexture
    Print Friendly and PDF
    Quick Page/Post Redirect Plugin
    Social Sharing Toolkit
    Spam Free WordPress
    TinyMCE Advanced
    Types - Complete Solution for Custom Fields and Types
    WYSIWYG Widgets

    Operating System: Linux CentOS
    PHP Version: 5.2.17

  4. gr0uch0mars
    Member
    Posted 1 year ago #

    I have this problem too. Sometimes it doesn't save some dates: when I try "06/01/1954", it works. When I try "01/06/1954", it displays "-491875200". Why?

    WordPress: 3.5.1
    Theme: BuddyPress Default
    Plugins:

    • BuddyPress
    • BuddyPress Multilingual
    • Posts 2 Posts
    • WPML Multilingual CMS

    OS: Mac OS X 10.8.2
    PHP: 5.3.15

  5. hejeva2
    Member
    Posted 1 year ago #

    FYI:
    I made a copy of the website:
    Disabled all plugins except for types and also switched the theme to Twenty Twelve.

    The same problem still arises.

    If you want access to dev site, to take a look at it please let me know and I can get credentials to you.

  6. gr0uch0mars
    Member
    Posted 1 year ago #

    For our information: The plugin stores the dates in the db as timestamps ("-491875200"), so the problem must be in returning the value with the correct format ("01/06/1954").

  7. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hejeva2,

    I am not able to replicate the issue in my local copy. Please send me your DB dump and log-in details to my mail -> bigul.m@wpml.org.

    Please Note: Kindly take a back up before sending the database.

    [ Signature moderated. ]

  8. hejeva2
    Member
    Posted 1 year ago #

    I sent you an email with the requested information. Let me know if you don't get it. The db is attached.

  9. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hejeva2,

    I have received your mail. We will work on it and update you soon.

    [ Signature moderated. ]

  10. enoquenroll
    Member
    Posted 1 year ago #

    Hi mbigul?

    I'm having problems with the date format. My site is in Portuguese, and when I set a date in the date field, it shows a message that error has the date is invalid! : (

    He does not accept date in format: 20/03/2013. dd/mm/yyyy

    Have any tips?

    Thank you.

  11. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi hejeva2,

    It is happens rarely when in one group has multiple date fields. We will add fix for it soon.

    [ Signature moderated. ]

  12. hejeva2
    Member
    Posted 1 year ago #

    Just updated the plugin and if the 1.2.1 release had the bug fix in it. It didn't help and the issue is there there.

    I don't think its rare or I have found a way to hit the bug frequently because 9 out of the first 50 posts have the issue.

  13. enoquenroll
    Member
    Posted 1 year ago #

    They have made available a new version, but did not correct the error with the field of type date.

    Let's wait for the next version, because the plugin is very good!

    My question is: WordPress has an option to set the date format (which I believe is in accordance with the user's region) and because the plugins do not use this definition?

    What is the definition of default date if the plugins do not use this feature of the WordPress API?

  14. yiannisf
    Member
    Posted 1 year ago #

    Hi there!

    I run into the same issue myself. I am running WP v2.5.1 and the Types plugin v1.2.1 which I used to create a custom post type to which I added two custom date fields.
    Both these date fields seem to have an issue with some specific dates.

    For example if I input the date 2012/11/22 and hit the update button on the admin panel, the value on the admin panel is replaced with 1353542400 which translates to 2400/03/25 on the blog.

    I am pretty sure that the fact that part of the wrong date is part of today's date (03/25) is somehow relevant, but I am not sure how.

    Also note that this does not happen with all the dates.

  15. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi All,

    Sorry for the issues. We will fix the bug in Types 1.3. Our developers are working on it.

    [ Signature moderated. ]

  16. yiannisf
    Member
    Posted 1 year ago #

    That's good to know!

    In the meantime could someone post a link from where I could download version 1.1.3.4 so that I rollback to it?

    Is there any rough estimation about when this new version will be available?

    thx!

  17. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi yiannisf,

    Most probably by next week we will release Types 1.2.1.1 with few more fixes, which will include this date fix too.

    Please check this link to download Types 1.1.3.4 http://wordpress.org/extend/plugins/types/developers/

    [ Signature moderated. ]

  18. Twansparant
    Member
    Posted 1 year ago #

    Same problem, discussed here.

  19. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi All,

    Types 1.2.1.1 is released. Please check. Hope it will work.

    [ Signature moderated. ]

  20. Twansparant
    Member
    Posted 1 year ago #

    Yes, that fixed it!
    Thanks!

  21. gr0uch0mars
    Member
    Posted 1 year ago #

    Excuse me, it's not solved for me.

    Every date now displays as "01/01/1970". I updated everything and tried either [types field="my-date"] or PHP's types_render_field(“my-date”, $parameters). Neither of those methods makes difference.

    The date is correctly "timestamped" inside the database, and ON THE EDIT FORM it appears correctly!, but when I visit the site, the date is "reset" to 01/01/1970…

  22. Twansparant
    Member
    Posted 1 year ago #

    If it's correct on the edit page and in the database, it must be your code.
    Did you try this:
    echo types_render_field('my-date', array('format'=>'d/m/Y'));

  23. hejeva2
    Member
    Posted 1 year ago #

    The fix worked for the issue on my site. Thank you for resolving this.

  24. Twansparant
    Member
    Posted 1 year ago #

    Actually, I have the same issue as gr0uch0mars.
    If a date field is left blank on the edit page, it displays 01 January, 1970 on the front-end.

  25. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Twansparant,

    Please check it is happening with Types latest version(Upgrade after a backup). If issue exist, Please create a new thread. Because this one is resolved.

    [ Signature moderated. ]

  26. Twansparant
    Member
    Posted 1 year ago #

    Hi Bigul,

    With the latest version 1.2.2 the problem still exists, but I got the development version 1.3 and that fixed it. Hope that will get released soon!

    Thanks, Toine

  27. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Twansparant,

    Nice to hear that. Thanks for the updates.

    [ Signature moderated. ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic