• Resolved mittyan

    (@mittyan-ru)


    Hello there!
    I can’t update a field via update_post_meta – it doesn’t work properly. See this GitHub page: https://github.com/mgibbs189/custom-field-suite/issues/414
    Plus I just noticed – when you update a field via CFS()->save method, even if I set the ID and post_type of the post to be updated in the args array – array( ‘ID’ => 123, ‘post_type’ => ‘sessions’ ) – it won’t only update this existed post but create a new one with the default title “My CFS post”, at the moment I’m removing 1600 posts were created during the tests: https://gyazo.com/277105b75c1126e77bb9b5888ca48d2a

    Full code example:
    $field_data_timer = array( ‘session_timer’ => $_POST[‘timer’] );
    $session_id = array( ‘ID’ => $_POST[‘sessionid’], ‘post_type’ => ‘sessions’ );
    CFS()->save( $field_data_timer, $session_id );

    Could you please fix this bug? I’m using your plugin for years, but never created a new post via frontend – that’s a really important function that should be fixed.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mittyan

    (@mittyan-ru)

    Weird, I tried one more time – and now everything’s ok with update_post_meta method, but you CFS()->save method is still buggy and makes duplicates, please check it when you have a free minute.

    Plugin Author Matt Gibbs

    (@mgibbs189)

    CFS does not integrate with update_post_meta. That’s why we provide CFS()->save().

    CFS includes an extra database table to keep track of post -> field relationships. It makes CFS really fast, but this is one of the trade-offs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Duplicates on CFS()->save + update_post_meta issue’ is closed to new replies.