The author of Custom Permalinks says there isn’t an issue with his plugin. I don’t necessarily believe him. Not sure if you have any insights.
Are you aware of issues when custom permalinks are being used?
I believe there was one other person here in the forums who reported the same problem with the same plugin. Will investigate when I get a chance, but please don’t expect a resolution anytime soon.
@lsilver – The problem looks to be the fact that Custom Permalinks allows for people to erroneously assign the same permalink to multiple posts. This creates conflicts. So what’s happening, I believe is that when you Revisionize a post, it copies the permalink you set. The Custom Permalinks plugin naively grabs the most recent post that has the particular permalink – EVEN IF IT’S NOT PUBLISHED. I think the solution should be that Custom Permalinks should only utilize permalinks of published posts (not Draft or Pending posts).
Regardless, I have a work-around. Version 2.2.2 has a code update allowing you to add actions that lets do stuff after a revision is created or published. Add this code to your functions.php and then things should hopefully work for you.
add_action('revisionize_after_revision_created', function($id) {
$p = get_post_meta($id, 'custom_permalink', true);
if ($p) {
delete_post_meta($id, 'custom_permalink');
update_post_meta($id, '_saved_custom_permalink', $p);
}
});
add_action('revisionize_after_publish', function($id) {
$p = get_post_meta($id, '_saved_custom_permalink', true);
if ($p) {
delete_post_meta($id, '_saved_custom_permalink');
update_post_meta($id, 'custom_permalink', $p);
}
});