Support

Account

Home Forums ACF PRO New field date-time-picker clashes with add-on

Solved

New field date-time-picker clashes with add-on

  • Hello,

    I did use the add-on date-time-picker in several projects and though I appreciate the field being integrated in the acf plugin it clashes now with the installed add-on when I update to ACF Pro 5.3.9. with the error “Fatal error: Cannot redeclare class acf_field_date_time_picker”. I know this is the error of the add-on.

    But even when I deactivate the add-on I have the problem, that the new field does not replace the add-on meaning it does not read the settings I have configured my date-time-picker field with.

    The Output is now “16/06/2016 10:00 pm” though it used to be “2016-06-16 22:00”. (in json: “date_format”: “yy-mm-dd”, “time_format”: “HH:mm”,). This breaks my whole programming. I don’t really know what to do now. I have not really the time and energy to go through all my projects and hope that you can fix this, that it will really replace the add-on with the same behaviour (pleaaase!)

    King regards, Britta

  • I would suggest that for now you revert to 5.3.8, you can get it by logging into your account https://www.advancedcustomfields.com/my-account. And you should submit a support ticket here https://support.advancedcustomfields.com/new-ticket/

  • Hi @britta

    As a temp fix, you may comment out the inclusion of ACF’s date_time picker in the file: acf.php on line 224:

    
    // acf_include('fields/date_time_picker.php');
    

    This will prevent ACF from including it’s own, and you can continue to use the 3rd party one.

    Can you please check your DB wp_postmeta table and view the value that is stored by the 3rd party field?
    What is the value?
    – ACF PRO saves the value like so: YYYY-MM-DD hh:ii:ss
    – If the values are similar, they should be compatible

  • Hi Elliot,

    the meta_value in wp_postmeta was saved like this: 2015-11-10 20:00, so this is not a problem.

    The problem was, that the default value of the new field date_time_picker is “16/06/2016 1:42 am” and not “2016-06-16 01:42:02”.

    I changed this now with my fields which use the date_time_picker, but it was quite a hassle to update all my projects.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘New field date-time-picker clashes with add-on’ is closed to new replies.