Home Forums Plugin Support WP User Frontend Pro Admin fields not saving on update

This topic is: resolved

This topic contains 11 replies, has 4 voices, and was last updated by  pjeaje 4 years, 11 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #22831

    ndw
    Participant
    Post count: 13

    WPUF 2.2.1

    Changes are not being saved in the admin area when updated.

    For example in ‘Post Settings' I check ‘Enable Guest Post', hit Update and the setting hasn't been saved. The same happened when I tried to change ‘Set Post Status to' from ‘Published' to ‘Pending Review' – it stays on ‘Pending'.

    Do you have any suggestions to make sure changes are saved when updated?

    Thanks

    #22907

    ndw
    Participant
    Post count: 13

    Some more info.

    In the .json file there are no settings being saved for the form(“settings”:””}}). I edited the .json file to include settings and imported the form again using your new import/export tool (thank you!) and the settings I need are there, however as soon as I hit the ‘update' button all changes are removed and there is nothing under settings in the exported .json file.

    I have a work around by directly editing the json file and importing it, but it would be great to get an idea how to fix it.

    Thanks

    #22921

    Nizam Uddin
    Keymaster
    Post count: 670

    Hello
    Sorry for inconvenience! Please send us your site access as private reply so that we can investigate the problem. Thank you..

    #23087

    ndw
    Participant
    Post count: 13
    This reply has been marked as private.
    #23096

    Sekander Badsha
    Member
    Post count: 2067

    Hello Ndw,
    I can see a lot of plugins in your site especially the security and the cacheing ones – may cause the conflict to save/update the form data. Please check by disabling the plugins.

    and here is the fix for the form duplicating issue: Open form.php which is located at “wp-content/plugins/wedevs-user-frontend/admin” find the function named duplicate_form and replace that function with the codes below.

    function duplicate_form() {
            check_admin_referer( 'wpuf_duplicate' );
    
            if ( !current_user_can( 'activate_plugins' ) ) {
                return;
            }
    
            $post_id = isset( $_GET['id'] ) ? intval( $_GET['id'] ) : 0;
            $post = get_post( $post_id );
    
            if ( !$post ) {
                return;
            }
    
            $contents = self::get_form_fields( $post_id );
    
            $new_form = array(
                'post_title'  => $post->post_title,
                'post_type'   => $post->post_type,
                'post_status' => 'draft'
            );
    
            $form_id = wp_insert_post( $new_form );
    
            foreach ( $contents as $content ) {
                $post_content = maybe_unserialize( $content->post_content );
                self::insert_form_field( $form_id, $post_content, null, $order );
            }
    
            if ( $form_id ) {
                $form_settings = wpuf_get_form_settings( $post_id );
                update_post_meta( $form_id, $this->form_settings_key, $form_settings );
                $location = admin_url( 'edit.php?post_type=' . $post->post_type );
                wp_redirect( $location );
            }
        }

    This issue will be fixed in our next update. **Do not edit the codes if you're not sure about what you're doing.**

    #23098

    ndw
    Participant
    Post count: 13

    Hi,

    Thanks for having a look.

    I have deactivated all plugins (other than WPUF) and changed WordPress theme to Twenty Fourteen and the post settings are still not saving/updating.

    The duplicating issue is now resolved – thanks.

    Cheers

    #23140

    ndw
    Participant
    Post count: 13

    Some more info…

    #23172

    Sekander Badsha
    Member
    Post count: 2067

    Hello Ndw,
    I guess a fresh install of WordPress may help you out. Can you try ?

    #23261

    ndw
    Participant
    Post count: 13

    Do you mean go to Dashboard > Updates > Re-install (wordpress) now

    or

    do you mean something else?

    Thanks

    #23298

    Sekander Badsha
    Member
    Post count: 2067

    No I mean starting from the beginning. Install a new WordPress and the plugin and see if the issue persists.

    #23492

    ndw
    Participant
    Post count: 13

    Ok. It will take me some time to do this. I will let you know how it goes. Thanks for the help.

    #23551

    pjeaje
    Member
    Post count: 12

    Hey, this post is not resolved!

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

The topic ‘Admin fields not saving on update’ is closed to new replies.