This topic is: resolved

Tagged: ,

This topic contains 8 replies, has 3 voices, and was last updated by  symbiote 5 years, 7 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #8072

    symbiote
    Participant
    Post count: 33

    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

    #8073

    Mahi
    Member
    Post count: 1555

    Please update to latest version. It should be fixed.

    #8098

    symbiote
    Participant
    Post count: 33

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

    #8124

    symbiote
    Participant
    Post count: 33

    Hello?

    #8126

    Tareq Hasan
    Keymaster
    Post count: 2831

    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]

    #8135

    symbiote
    Participant
    Post count: 33

    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

    #8185

    symbiote
    Participant
    Post count: 33

    Bump

    #8186

    Tareq Hasan
    Keymaster
    Post count: 2831

    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”.

    #8188

    symbiote
    Participant
    Post count: 33

    Thanks Tareq, really appreciate it. Sorry for pestering, but it's pretty much a requirement ๐Ÿ™‚

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘Edit post bug!’ is closed to new replies.