Nick Sinclair
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Duplicator] Not creating same Post Type (v2.39)Hi,
I’m not sure if v2.40 resolved the issue, but I wanted to try an experiment anyway.
I inserted the following code into your includes/settings.php file:
add_action( 'pre_plugin_update', 'mtphr_post_duplicator_initialize_settings' );
then I ran my test again with this patch and everything seemed to work (but updated to v2.40 instead of v2.39). I didn’t need to re-save the settings in the admin area or anything like that.
The thinking was to get the plugin to save its config settings prior to updating in an attempt to “force” it to stick.
Not sure if that helps or not, just thought I’d share.
Forum: Plugins
In reply to: [Post Duplicator] Not creating same Post Type (v2.39)I do see that the default Post Status setting on the old version is “Same as Original” but I have the default in the new version set to “Draft”. So, that would make a difference if the settings where never saved prior to updating the plugin. Does this seem like this could be the issue you are seeing?
Yeah, that makes sense – I’ve never saved/changed the Settings from the default for this plugin on any site. I’ve never needed to.
I tested again with vanilla WP 6.7.1, PHP 8.0 on InstaWP installing v2.37 first.
- Install v2.37
- Noticed the default Post Status setting here is also “Draft”!
- Save default settings
- Update to v2.39
- Everything works as expected!
The default Post Type setting is the same between old and new plugins, though. Did you see the post type issue on the other sites you tested on well?
Yes it looks like the issue was happening because the settings were not set in the database already. I’m not sure if there’s a way around that or if you even want to bother trying to fix it.
I imagine a lot of people probably would never adjust the default settings though and would likely come across this issue after updating too…
Forum: Plugins
In reply to: [Post Duplicator] Not creating same Post Type (v2.39)Okay, tried on a completely vanilla version (WP 6.7.1, PHP 8.0) using InstaWP.
This time, I installed an old version first (v2.37 for reference). Then, after updating to the latest version, I came across the same issues as I mentioned.
You may not be coming across it if you install it from v2.39 directly – try starting with a pre-v2.38 version and updating it instead.
Forum: Plugins
In reply to: [Post Duplicator] Not creating same Post Type (v2.39)Just tested it on another site, this time upgrading from v2.36
Same thing happened. Same steps to reproduce, even with Post Status getting set to Draft when I didn’t tell it to.
I’ll try on a completely vanilla version of WordPress and let you know. It’s possible it’s my setup, but I can’t see how yet.
Forum: Plugins
In reply to: [Post Duplicator] Not creating same Post Type (v2.39)I tried that (without changing any settings, because I didn’t want them changed) but that didn’t seem to make a difference.
Then, I tried:
- Setting the Post Type setting to “Page”,
- Saving
- Setting the Post Type setting to “Same as original”,
- Saving
- (for some reason, now Post Status setting is set to “Draft”?)
- Now “Duplicate Page to” says, “Duplicate {Post Type}”
- Change Post Status setting back to “Same as Original”
- Saving
It all appears to be working again now.
So, I guess mainly an issue with retaining the settings after the Settings page update?
- This reply was modified 3 weeks, 2 days ago by Nick Sinclair.
Forum: Plugins
In reply to: [Post Duplicator] PHP Fatal Error (v2.38)I’ve done some more testing and, while that particular issue is definitely resolved, I’m coming across other issues now.
I’ll create a new support ticket though so you can keep tabs if that’s helpful.
Forum: Plugins
In reply to: [Post Duplicator] PHP Fatal Error (v2.38)Excellent, thanks for resolving the issue so quickly!
Big fan of this plugin, I use it across all of our sites.
Thanks for your efforts and responsiveness!