Conditional Logic broken by new Frontend Submission release

Support MB Conditional Logic Conditional Logic broken by new Frontend Submission releaseResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17361
    TerranTerran
    Participant

    I just installed today's release of the Frontend Submission plugin (version 2.0.6) and that seems to have broken the Conditional Logic on the front end. Conditional Logic still works on the backend and it was working yesterday on the front with Frontend Submission version 2.0.5.

    Would it be possible to fix this?

    And in the meantime it's more important that I have conditional logic working that the delete button. Could you tell me where I can access version Frontend Submission 2.0.5?

    Thanks!

    #17409
    Anh TranAnh Tran
    Keymaster

    Hi Terran,

    Can you send me the code of the meta box that has problem with the conditional logic? The latest update of MB Frontend Submission doesn't have anything to do with the output of fields. It's quite strange that it breaks conditional logic.

    #17424
    TerranTerran
    Participant

    Sure, here you go:

    https://pastebin.com/We87tiyC

    As you'll see, all the conditions are set based on that first "publication_type" dropdown field.

    I just double checked by updating to Frontend Submission 2.0.6 and the conditions break, then reverting to 2.0.5 with no other changes and they come back, so that's definitely the cause. The conditions continue to work in the backend version of the metaboxes.

    #17576
    SIWSIW
    Participant

    This is caused by the check constant MB_FRONTEND_SUBMISSION_DIR in wp-content\plugins\meta-box-aio\vendor\meta-box\meta-box-conditional-logic\conditional-logic.php:

    
    if ( ! is_admin() && ! defined( 'MB_FRONTEND_SUBMISSION_DIR' ) ) {
        return;
    }
    

    This constant is not used in Frond End Submission, but instead MBFS_DIR is defined.
    However, changing this would result in the conditional logic scripts to be enqueued on all front end pages regardless of the presence of a front end form.
    Wouldn't it be better to (instead of using the constant) look at the presence of conditions (just like is done for enqueueing the validation scripts)?

    #17578
    Anh TranAnh Tran
    Keymaster

    Hi SIW, thanks a lot for your investigation. I'll check and fix it now.

    Update: I've fixed it in the latest version. Please update.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.