Admin fields not saving on update

This topic contains 11 reply and 4 voices, and was last updated by pjeaje 10 years, 4 months ago
Viewing 11 Posts - 1 through 11 (of 11 total)
Author Posts
July 3, 2014 at 10:52 am 22831
pjeaje 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
July 4, 2014 at 8:46 am 22907
ndw ndw

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

July 4, 2014 at 6:08 pm 22921
Nizam Uddin Nizam Uddin

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

July 7, 2014 at 11:11 am 23087
ndw ndw This reply has been marked as private.
July 7, 2014 at 1:38 pm 23096
Sekander Badsha Sekander Badsha

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

July 7, 2014 at 2:01 pm 23098
ndw ndw

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

July 7, 2014 at 9:16 pm 23140
ndw ndw

Some more info…

July 8, 2014 at 10:39 am 23172
Sekander Badsha Sekander Badsha

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

July 10, 2014 at 9:22 am 23261
ndw ndw

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

or

do you mean something else?

Thanks

July 10, 2014 at 5:29 pm 23298
Sekander Badsha Sekander Badsha

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

July 14, 2014 at 5:47 am 23492
ndw ndw

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

July 14, 2014 at 10:06 pm 23551
pjeaje pjeaje

Hey, this post is not resolved!

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