• Resolved Cremazie

    (@cremazie)


    I used this plugin to duplicate a prior post and make edits. When I cloned it (as a draft), the plugin captured the time of the clone as the post date. When I made the final edits a couple of days later and published the post, the post date did not reflect the publish time but rather the time I duplicated the post…

    When I clone a post, I would like the plugin to put the post back to “Publish immediately”. Any solution?

    http://wordpress.org/extend/plugins/duplicate-post/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Enrico Battocchi

    (@lopo)

    Hi,
    you’re right, I did a mistake in handling the option about whether to copy the original post date or not.

    I’ll fix this issue in the next release, hopefully very soon.

    Hi,
    version 2.4 (out now) fixes the issue.

    Thanks.

    Thread Starter Cremazie

    (@cremazie)

    Thank you for the quick fix!

    I have another issue… We are using your plugin in combination with WPML Multilingual CMS Plugin (http://wpml.org/). Everything seems to work perfectly, except when we clone a post in english it clones it in French (the native language of the site). It seems that the clone doesnt keep the language attribute… Anything you can do?

    Hi,
    I don’t have any experience of WPML, I suppose it uses non-standard tables for its data, so they don’t get cloned.
    I’ll try to see what can I do but I must be sincere: don’t hold your breath… 🙂

    I was looking at WPML’s behaviour, it uses indeed some custom tables, so a custom function must be hooked to dp_duplicate_page.

    But please help me understand:
    I’ve set up a blog with Italian as the main language, and added French as secondary. I’ve created a post in Italian, then created a post as its French translation. If I clone the latter, the copy has French title and text: the only problem is that its language is set as Italian.
    Does the same happen to you?

    I’d also have to decide what to do when someone clones the original post (in the “main” language): do you think that all its translations would have to be cloned as well?

    Thread Starter Cremazie

    (@cremazie)

    Yes the same happened to me. The only problem is that the language of the clone is set back to “the main language” (instead of secondary language).

    For your second question : “What to do when someone clones the original post (in the “main” language)?” I think that all its translations would have to be cloned as well. This would avoid us to manually relink a primary language post and its translation…

    Thanks again for you help.

    Hi,
    I’ve tried to write a “plugin to my plugin” to deal with WPML custom tables.
    Please read the following carefully:

    1. This code is released with ABSOLUTELY NO WARRANTY. Do not try to install it on a production site: if you do you’re on your own, and you’d better have a backup of your site.
    2. The code has been developed against WPML 2.4.1, the most recent version I happened to put my hands on. I have absolutely no idea if it will work with other versions. I’m not even sure it will work outside the blog where I tested it.
    3. The code needs to be used alongside the development version of Duplicate Post (you can find it under “Other versions”). Using it with any other version will result in severe damage to your blog, which can be fixed only directly on the DB.
    4. Let me further stress that the code is released with ABSOLUTELY NO WARRANTY
    5. There is at least one problem known (in addition to who-knows-how-many bugs): WPML organizes posts in translation groups, with a (let’s call it) master post and N translations. Now, nothing says that the master post has to be in the current default language of the blog: for example, if my blog is in Italian and secondarily in French, if I create a post in French and only later I add a translation in Italian, WPML’s table marks the French version as the master post for this translation group, regardless of which language is set as the default one. As I can see, there is no way to determine what post is the master of its translation group unless you look at the table in the DB. Why you need to know what’s the master post for that group? Because cloning that will clone all the group – if you clone every other post, this code will only preserve its language flag, but will create a new translation group. So, this code is only useful if you have never AND will never change the default language of the blog, AND if you have always created the post in the default language first before its translations. A solution for this problem could be to edit the code to clone all the translation group when the translation in the current default language is cloned, regardless of which is the master post. I’ll see in the future.
    6. Did I happen to mention that the code is released with ABSOLUTELY NO WARRANTY? 🙂

    Well, if you’ve read (and understand – I hope it’s clear enough) all the caveats, you can find the plugin here: http://plugins.svn.wordpress.org/duplicate-post/branches/experimental/
    Just put the PHP file in you plugins/ folder, then activate it in the Plugins list of WP Administration.

    If you are so fearless to test it, every bug report will be appreciated as long as they’re not complaints, as you can imagine for the above mentioned reasons.

    treccase

    (@treccase)

    Bonjour,

    I read your instructions very carefully to make sure I didn’t miss anything regarding the php file you created to help clone WPML.

    However I was unable to find anything about the type of warranty you offer with this file and whether you can guarantee that the primary language of the post will indeed be identical to that of the website.

    Would you please briefly go over that very important facet of your wonderful file? Thank you and keep up the good work.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Duplicate Post] Post date did not reflect publish time but the time I duplicated the post’ is closed to new replies.