Forum Replies Created
-
AuthorPosts
-
Austin Passy
ParticipantI 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.
Austin Passy
ParticipantHere 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
Austin Passy
ParticipantJumping 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.
January 7, 2021 at 4:36 AM in reply to: ✅Dashboard widget & WordPress Events & News Feed Hijack #23870Austin Passy
ParticipantThanks, assuming this commit also took care of the Illegal string offset 'title' PHP error (that I can see).
July 25, 2020 at 10:34 PM in reply to: Field Type: post - filter query args by external fields #20965Austin Passy
ParticipantThanks. 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".
July 24, 2020 at 10:35 PM in reply to: Field Type: post - filter query args by external fields #20954Austin Passy
ParticipantI 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.
July 24, 2020 at 7:57 AM in reply to: Field Type: post - filter query args by external fields #20947Austin Passy
ParticipantKinda seems like I just explained a custom field type like
relationshipin ACF: https://www.advancedcustomfields.com/resources/relationship/Austin Passy
ParticipantValidated the updated function is working without issues.
Austin Passy
ParticipantThanks, I will test this today and report back.
Austin Passy
ParticipantSorry, 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.
Austin Passy
ParticipantAfter 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
relationdefinitions orwhenconditions (as nothing in the docs said those are required attributes (I see the code adds those if missing).Austin Passy
ParticipantJust getting around finally to looking into this issue further now.
I've tracked it down to an issue on a
taxonomytype field with field_type set toselect_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].Austin Passy
ParticipantIs there a reason
textareais usingwp_kses_postoversanitize_textarea_field?Austin Passy
ParticipantWhile 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)).
Austin Passy
ParticipantIn an ideal would it should be simple to add this to the select advanced field type. If an attribute like
sortable => truewas set along withmultiple => 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.
-
AuthorPosts