• Resolved jakwalker

    (@jakwalker)


    Hello,

    When I try to change the modified date it doesn’t do anything once saved… It just reverts back to the old date.

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author djuric

    (@djuric)

    Hello,

    Which version of the plugin are you using and is this happening for posts post type?

    Also if you could attach screenshot or demo video it would be helpful to debug this.

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    Thank you for your reply.

    Yes this is happening on post post type and I’m using the latest version 1.3.

    I made a quick video so you can see the date is set as 22nd March but if I try a change it to another date the date goes back to the 22nd March again.

    https://youtu.be/RBwUagrzjeM

    Kind Regards

    Jak

    Plugin Author djuric

    (@djuric)

    hi Jak,

    Thanks for sharing the demo, that was helpful.

    What you need to do here is to select the date and then enable “Freeze modified date” option at the same time (before you update the post). If you set the date, then update the post first then next update of the post will take current date.

    Let me know if this work for you.

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    I have tried doing this also to no avail.

    Here is another video of me attempting it…

    https://youtu.be/t2u3admZ34U

    As you can see the date keeps changing back to the original date.

    Kind Regards

    Jak

    Plugin Author djuric

    (@djuric)

    hi Jak,

    I see what you mean now, it’s the confusion with “Freeze modified date” which when enabled takes currently saved date from database. It will not freeze on selection from date picker. Please go with following steps:

    – Select the new date and then Update the post (without enabling “Freeze modified date”)
    – Enable “Freeze modified date”. At this point the date in bold should be showing previously saved date
    – Update the post again. From now on, no matter how many times you update the post, modified date will remain the same

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    I have tried this as well…

    https://youtu.be/YWYdM2HszUE

    Any other suggestions?

    Kind Regards

    Jak

    Plugin Author djuric

    (@djuric)

    hi Jak

    This looks like a possible conflict with some of the plugins or an issue with your installation. I just tried on my local installation and this is working correctly, check this demo https://www.youtube.com/watch?v=ahelr3mbkoA

    Have you tried deactivating other plugins?

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    Ah OK it’s not a plugin issue but turns out it’s a conflict with my theme.

    Do you have any ideas how I may diagnose what the conflict could be at all?

    Kind Regards

    Jak

    Plugin Author djuric

    (@djuric)

    hi Jak,

    You could first checking if there are any errors in browser console to see if there is anything helpful there.

    I’m not sure what could the theme do to conflict with this functionality because this plugin will simply use the editor’s global state and REST endpoint filter to prevent updating modified date.

    Is that theme in WordPress official theme repo so I can test it?

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    The theme is in the wordpress theme (MH Magazine) however I’m using the Pro version and I’ve tested the lite version and there is no issues with that.

    I can give you access to a demo site to take a look at if your like?

    Not sure how I can give to the details on here?

    Kind Regards

    Jak

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko

    I’ve actually managed to get it down to being an issue in the functions.php file I will see if I can locate which specific code is causing the conflict and let you know.

    Kind Regards

    Jak

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    OK so I found the function in function.php which brings in another function from a different file…

    if (!function_exists(‘mh_add_meta_boxes’)) {
    function mh_add_meta_boxes() {
    add_meta_box(‘mh_post_details’, esc_html__(‘Post Options’, ‘mh-magazine’), ‘mh_post_options’, ‘post’, ‘normal’, ‘high’);
    }
    }
    add_action(‘add_meta_boxes’, ‘mh_add_meta_boxes’);

    If I remove this code then it allows your plugin to work fine. Any ideas what the issue could be from this?

    Kind Regards

    Jak

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    Not sure if it helps but if I remove the ‘post’, from the forth line down then it works.

    Kind Regards

    Jak

    Plugin Author djuric

    (@djuric)

    hi Jak

    Thank you very much for your effort to narrow down this issue. I was able to replicate by registering a meta box for post. This seems to happen due to 2nd ajax request sent to save data from meta boxes.

    I will be adding fix for this in next update.

    Best Regards
    Zarko

    Thread Starter jakwalker

    (@jakwalker)

    Hi Zarko,

    That’s great!

    No problem at all! Thank you for your help too it’s much appreciated!

    Kind Regards

    Jak

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Does not work.’ is closed to new replies.