Edit post bug!

This topic contains 8 reply and 3 voices, and was last updated by symbiote 10 years, 7 months ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
September 12, 2013 at 4:10 pm 8072
symbiote Hi Tareq, We're launching our site in a few weeks so we'd need this actioned ASAP. With our WP_UF Pro configuration, we by default set user's submissions to 'pending', so that we may review them. This part works. If a user opens up their article that is 'pending' and edits it, when they hit 'update'.. it becomes published which is not the desired effect. Can you please fix this? Thanks Dave
September 12, 2013 at 4:24 pm 8073
Mahi Mahi

Please update to latest version. It should be fixed.

September 13, 2013 at 6:07 am 8098
symbiote symbiote

I am running version 2.1.7, isn’t this the latest version?

September 14, 2013 at 5:42 am 8124
symbiote symbiote

Hello?

September 14, 2013 at 6:37 am 8126
Tareq Hasan Tareq Hasan

The solution would be disabling post editing when the post is in pending status. This feature isn’t yet in the plugin. To do that, please follow the instructions:

Open `/class/frontend-dashboard.php’ and replace these lines (176-178):
[php]
?>
<a href="<?php echo wp_nonce_url( $url, ‘wpuf_edit’ ); ?>"><?php _e( ‘Edit’, ‘wpuf’ ); ?></a>
<?php } ?>
[/php]

with this:
[php]
if ( $post->post_status != ‘pending’ ) {
?>
<a href="<?php echo wp_nonce_url( $url, ‘wpuf_edit’ ); ?>"><?php _e( ‘Edit’, ‘wpuf’ ); ?></a>
<?php
}
}
?>
[/php]

This should do fine.

For more security, open /class/frontend-form-post.php and the snippet below line 90:
[php]
if ( $curpost->post_status == ‘pending’ ) {
return ‘<div class="wpuf-info">’ . __( ‘You can\’t edit a post while in pending mode.’, ‘wpuf’ );
}
[/php]

September 14, 2013 at 8:04 am 8135
symbiote symbiote

Hi Tareq,

Thanks for your reply.

What if we would like users to have the ability to edit posts that are pending? We have a moderation process on our upcoming website whereby if a user’s submitted article is not up to scratch, we give them the ability to go back and fix it up. I think the better solution would be giving the ability to edit a post no matter what its status is, but always keeping that same status once the edit is complete.

I can imagine other sites would like this ability too.

Thanks
Dave

September 15, 2013 at 8:17 am 8185
symbiote symbiote

Bump

September 15, 2013 at 9:26 am 8186
Tareq Hasan Tareq Hasan

I am going to release a version with some other fixes within few days. Guess I’ll be adding an option in the edit post status to “No Change”.

September 15, 2013 at 9:45 am 8188
symbiote symbiote

Thanks Tareq, really appreciate it. Sorry for pestering, but it’s pretty much a requirement 🙂

Viewing 8 Posts - 1 through 8 (of 8 total)