WordPress.org

Ready to get started?Download WordPress

Forums

WP SIMILE Timeline
Time duration posts not working (16 posts)

  1. Karo278
    Member
    Posted 1 year ago #

    Hey,

    I've been trying to not only put one-day events into my timeline, but also events that cover several months. In the sample timelines, these are always marked with a beam.
    When I put the start/end dates into the SIMILE box on the post and click the boxes, then save the post, the time settings in the SIMILE box are set back to today instead of keeping the date I've put in.

    Not sure where the error is, but I could use some help on how to add these events with a duration.

    Thank you!

    http://wordpress.org/extend/plugins/wp-simile-timeline/

  2. freshlabs
    Member
    Plugin Author

    Posted 1 year ago #

    Did you mark the checkbox "Edit timestamp" in the SIMILE Timeline container before saving the post? Otherwise the extra event dates will be ignored.

  3. Karo278
    Member
    Posted 1 year ago #

    Yes, I did. Both the start and the end one. I do that, then hit Save, and the time settings are back to the current time.

  4. freshlabs
    Member
    Plugin Author

    Posted 1 year ago #

    I can't really reproduce this strange behavior. Sounds like the event fields are missing in the posts database table.

    Have you tried deactivating the plugin and activating it again? Depending on how many customizations you've made, you could also use the uninstall option to wipe all plugin-related database entries. If you reactivate the plugin, those should be installed.
    Also, be sure to use the latest version. There were some issues with database queries lately.

  5. elenis1517
    Member
    Posted 1 year ago #

    Same problem. deactivated and reactiveted... but time duration not working at all, date changes are not recorded.
    wp 3.5 theme skeleton

    PLEASE HELP!

  6. dereau
    Member
    Posted 1 year ago #

    I have successfully installed WP Simile Timeline on previous sites, but I am also having problems with a new installation on a new site now.
    The checkbox for "Edit Timestamp" on start date, or end date doesn't get saved. Database writing is still a problem.

  7. snakeyengel
    Member
    Posted 1 year ago #

    I have the same exact problem. I recently did de-install, deactivate, completely delete and re-installed the most recent version and this problem will NOT go away. It is always reset to Today for both the start and end dates. Very weird.

  8. onegeek2rule
    Member
    Posted 1 year ago #

    Exact same problem on WordPress 3.5.1, using a freshly installed wp-simile-timeline 0.4.8.6.

    Anyone found a fix/workaround?

  9. Deepak Rajpal
    Member
    Posted 1 year ago #

    There is some issue in addEventColumn() in WPSimileTimelineDatabase.class.php

    $wpdb->prepare statement is not creating start/end-date-column in wp_posts table which is desired to save date data. See following code for reference:

    `function addEventColumn($column_name){
    global $wpdb;
    if(!WPSimileTimelineDatabase::columnExists($column_name)) {
    $wpdb->query($wpdb->prepare("ALTER TABLE $wpdb->posts ADD COLUMN %s datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", array($column_name)));
    }
    }`

    I can see everything is fine until prepare statement fires with proper column name passing 4 times (4 columns should be created otherwise).

  10. Deepak Rajpal
    Member
    Posted 1 year ago #

    Got it.

    $wpdb->query($wpdb->prepare("ALTER TABLE $wpdb->posts ADD COLUMN %s datetime NOT NULL DEFAULT '0000-00-00 00:00:00'", array($column_name)));

    Replace above code (ver 0.4.8.5) with following (ver 0.4.8.4) in inc/WPSimileTimelineDatabase.class.php with in addEventColumn function.

    $wpdb->query( $wpdb->prepare("ALTER TABLE $wpdb->posts ADD COLUMN $column_name DATETIME NOT NULL DEFAULT %s", array("0000-00-00 00:00:00")) );

    It is because of prepare() call updated with in plugin version 0.4.8.5. FYI i am using wordpress version 3.0.4. (yupp pretty old :( )

    I hope it will solve it.

  11. kentro22
    Member
    Posted 1 year ago #

    I have the same issue. I tried your fix, deepakrajpal, but I am still having the same issues described above (WP 3.5.1).

    Anyone else manage to get the data edits to stick?

  12. nothroughroad
    Member
    Posted 1 year ago #

    Thanks deepakrajpal, that worked for me.

    It's line 63 in inc/WPSimileTimelineDatabase.class.php that needs replacing.
    Then I had to deactivate the plugin, delete the database tables, then reactivate.

  13. Deepak Rajpal
    Member
    Posted 1 year ago #

    @nothroughroad: I am glad it works for you.

    @kentro22: Have you tried to delete plug-in and install again with replaced lines in file mentioned. @nothroughroad is right, fix should work on plugin activation hook.

    Thanks

  14. kentro22
    Member
    Posted 1 year ago #

    All sorted. Works now. Thanks!

  15. elenis1517
    Member
    Posted 1 year ago #

    Followed your suggestion, but it does not work at all!
    Please help....

  16. elenis1517
    Member
    Posted 1 year ago #

    tried again and solved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic