Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 35 total)
  • Author
    Posts
  • in reply to: Conditional Logic seems broken since update #24601
    Austin PassyAustin Passy
    Participant

    I have confirmed the following:

    Broken on WordPress 5.6.2 with MB: 5.3.8 & AIO: 1.13.3

    Working on WordPress 5.5.x with MB: 5.3.8 & AIO: 1.11.19

    Need to figure out if a WordPress 5.6.x or AIO > 1.11.19 issue.

    in reply to: Conditional Logic seems broken since update #24599
    Austin PassyAustin Passy
    Participant

    Here it is as best I could encode the complete array: https://gist.github.com/thefrosty/15a86daf1bfcffc7d319fcde10ab5581

    I've also have a video showing the complex fields and how it is working: (expires in 7 days) https://webmshare.com/play/AWPGQ

    in reply to: Conditional Logic seems broken since update #24573
    Austin PassyAustin Passy
    Participant

    Jumping in here, I too have noticed our conditional logic is acting up, but causing "required" hidden fields to block post updates/publishes.

    We jumped from: (Meta Box AIO) 1.11.19 -> 1.13.3.

    in reply to: Dashboard widget & WordPress Events & News Feed Hijack #23870
    Austin PassyAustin Passy
    Participant

    Thanks, assuming this commit also took care of the Illegal string offset 'title' PHP error (that I can see).

    in reply to: Field Type: post - filter query args by external fields #20965
    Austin PassyAustin Passy
    Participant

    Thanks. I am working on an implementation, and if I feel it's not too hacky, I will share it here.

    Maybe let's not call it a relationship, but, "dynamic/external post query arg controls".

    in reply to: Field Type: post - filter query args by external fields #20954
    Austin PassyAustin Passy
    Participant

    I was afraid you point that out, and that's not what I was getting at. I just linked up the ACF one because it's post field has two outside selectors that filter the actual post dropdown (in theirs it's by post_type and taxonomy.

    in reply to: Field Type: post - filter query args by external fields #20947
    Austin PassyAustin Passy
    Participant

    Kinda seems like I just explained a custom field type like relationship in ACF: https://www.advancedcustomfields.com/resources/relationship/

    in reply to: TypeError: logics is undefined #19380
    Austin PassyAustin Passy
    Participant

    Validated the updated function is working without issues.

    in reply to: TypeError: logics is undefined #19377
    Austin PassyAustin Passy
    Participant

    Thanks, I will test this today and report back.

    in reply to: TypeError: logics is undefined #19343
    Austin PassyAustin Passy
    Participant

    Sorry, I am unable to paste my code as it's 20 post types, and thousands of custom fields.

    But I was able to spot incorrect JSON in the data-conditions attribute which may help. It would seem that double quoted aren't getting encoded properly.

    When I changed the get_conditional_html (and reverted the JS changes) I no longer see the logics errors.

    
    esc_attr( htmlspecialchars( wp_json_encode( $conditions ), ENT_QUOTES, 'UTF-8' ) )
      
    

    This was the json condition (part of it that didn't get encoded/escaped properly):

    
    "desc": "Alphanumeric, no special characters except for " - ".",
    

    Hope this helps.

    in reply to: TypeError: logics is undefined #19319
    Austin PassyAustin Passy
    Participant

    After spending many hours testing and checking all conditions the only logical issue comes down to the updated conditional-logic.js. If I go in an edit the following two functions, everything works again: isLogicCorrect() & getWatchedElements()

    In isLogicCorrect() check logics before continuing since :

    
    if (typeof logics === 'undefined') {
            return;
    }
    

    In getWatchedElements() wrap logic.when.forEach:

    
    if (typeof logic !== 'undefined') {
        logic.when.forEach(addWatchedElement, this);
    }
    

    We have a lot of conditions there are simple and do not have relation definitions or when conditions (as nothing in the docs said those are required attributes (I see the code adds those if missing).

    in reply to: TypeError: logics is undefined #19282
    Austin PassyAustin Passy
    Participant

    Just getting around finally to looking into this issue further now.

    I've tracked it down to an issue on a taxonomy type field with field_type set to select_advanced.

    Current condition:

    
    'visible' => [
                'tax_input[promo_type]',
                'contains',
                16,
            ]
    

    Also tried to different syntax's like [slug:tax_input[promo_type], 'contains', 'term-slug'], [slug:tax_input[promo_type], '=', 'term-slug'], [tax_input[promo_type], '=', 16].

    in reply to: Sanitization of Fields input #19082
    Austin PassyAustin Passy
    Participant

    Is there a reason textarea is using wp_kses_post over sanitize_textarea_field?

    in reply to: Select2 Library #18002
    Austin PassyAustin Passy
    Participant

    While that works from the sorting perspective, the fact that the data when set to multiple is saved as unique doesn't work. Quickly playing around with the core meta.php files for how data for field types are set. When I forced a multiple advanced selector to single=true data was in fact saved into an array which would of course allow for sorting. I didn't have additional time to play with the JS to force the new index arrays, but I assume it would be close to the way the clone order reindex works.

    Seems more plausible to create a new custom field type to get this done (if I ever find the time or the business needs really require it over cloned select fields (which could get very messy with 40+ clones)).

    in reply to: Select2 Library #17978
    Austin PassyAustin Passy
    Participant

    In an ideal would it should be simple to add this to the select advanced field type. If an attribute like sortable => true was set along with multiple => true, then the meta data saved would be non-unique and would solve this issue. Then this simple solution (along with enqueuing jquery-ui-sortable) https://github.com/select2/select2/issues/3004#issuecomment-149379355 would allow for these fields to be sortable.

    This would be an awesome feature.

Viewing 15 posts - 16 through 30 (of 35 total)