Forum Replies Created
-
AuthorPosts
-
Aart Jan van der Linden
ParticipantHi,
did your team manage to have a look at this?
Thanx!
Aart Jan van der Linden
ParticipantPerfect, thanx! I hope they find a way to insert some kind of filter.
Aart Jan van der Linden
ParticipantHi,
Thanx. I was hoping for a filter to make the new item always last.
This line in storage.php makes it always first:
order = isset( $orders[ $id ] ) ? $orders[ $id ] : 0;(If I change the 0 to 99 it does exactly what I need, but I was hoping to be able to do that using a filter/action)
Best,
AJ
Aart Jan van der Linden
ParticipantHi Long,
yes, that's true. It's happening on my PHP8 testserver, my apologies for not mentioning that.
Thanx for your reply!Best,
Aart Jan
Aart Jan van der Linden
ParticipantHi!
Thank you, I wasn't aware of that option. That certainly helps.
Best,
Aart Jan
Aart Jan van der Linden
ParticipantI believe it has to do with the sanitize_datetime() function in sanitizer.php (line 237). The abs() seems unnecessary?
Aart Jan van der Linden
ParticipantI think I found a solution: it works if the options array has keys:
'fields' => [ [ 'name' => 'Beroep', 'id' => 'profession', 'type' => 'select', 'flatten'=>false, 'options' => array( 'monkeys'=> array( 'value' => 'monkeys', 'label' => 'Monkeys' ), 'king_kong' => array( 'value' => 'king_kong', 'label' => 'King Kong', 'parent' => 'monkeys' ), 'curious_george' => array( 'value' => 'curious_george', 'label' => 'Curious George', 'parent' => 'monkeys' ), 'donkeys' => array( 'value' => 'donkeys', 'label' => 'Donkeys' ), 'eeyore' => array( 'value' => 'eeyore', 'label' => 'Eeyore', 'parent' => 'donkeys' ), 'guss' => array( 'value' => 'guss', 'label' => 'Gus', 'parent' => 'donkeys' ), ), ],Aart Jan van der Linden
ParticipantThanx, I now understand your way of looking at it.
Aart Jan van der Linden
ParticipantDear Anh,
I managed to reproduce the error by entering this code in a WYSIWYG field with a 'hidden' condition:
<header id="entry-header" class="entry__header yr-entry-header" data-rapid-sec="{"entry-header":"entry-header"}"></header>Somehow this makes the value of the data-conditions attribute invalid JSON.
(It turned out one of my co-workers pasted this messy HTML from another site in a WYSIWYG-field, this is part of the HTML)
Hope this helps..?
Best,
AJ
Aart Jan van der Linden
ParticipantP.S. this is the error thrown:
conditional-logic.js?ver=1.5:221 Uncaught TypeError: Cannot read property 'relation' of undefined at isLogicCorrect (conditional-logic.js?ver=1.5:221) at HTMLScriptElement.<anonymous> (conditional-logic.js?ver=1.5:182) at Function.each (jquery.js?ver=1.12.4-wp:2) at jQuery.fn.init.each (jquery.js?ver=1.12.4-wp:2) at runConditionalLogic (conditional-logic.js?ver=1.5:177) at conditional-logic.js?ver=1.5:595 at dispatch (jquery.js?ver=1.12.4-wp:3) at r.handle (jquery.js?ver=1.12.4-wp:3)Aart Jan van der Linden
ParticipantHi all,
same here. The code used to work fine, a few weeks ago.
Quite normal setup, but in some cases this 'logics is undefined' error appears, making it impossible to use the controls.Aart Jan van der Linden
ParticipantSorry for the delay, yes, both fields and metaboxes appear with duplicate ID's.
And that seems to be a way to solve this issue: different ID's for the metaboxes fixes the issue.
Field ID's are still identical over multiple metabox-definitions, but that doesn't seem to matter, does it? It's because I use the same fields for different CPT's and I want to use separate classes (one per CPT) to define them. But in the templates, the field ID should ideally be identical.
Aart Jan van der Linden
ParticipantHi,
the order definitely does influence the appearance of the admin columns, but only the highest one remains visible. Our website had multiple calls to
add_filter( 'rwmb_meta_boxes', function($metabox){$metabox[]=[....]}, 20);
(one for each post-type)If I add both
add_filter( 'rwmb_meta_boxes', function($metabox){$metabox[]=[....]}, 20);
and
add_filter( 'rwmb_meta_boxes', function($metabox){$metabox[]=[....]}, 21);
all fields function properly, except the admin columns: only the admin columns in the highest one do appear.Aart Jan van der Linden
ParticipantDid anyone ever find anything on this issue?
I'm having similar issues at the moment, and it looks like it's related to the id in the main array ('general' in this example).
On my setup it seems that only fields from an array where the 'id' is equal to the post-type slug are presented in the admin columns. But this is something recent, because I know quite certain that the field showed up a few months ago.Any thoughts?
Best,
AJ
October 31, 2019 at 5:15 PM in reply to: ✅Warning on metabox for relationship to multiple CPTs #16762Aart Jan van der Linden
ParticipantHi,
thanx for your reply. Sorry to be stubborn, but it seems to work (apart from the warning). It would be great if it could be supported this way, because it would make the relationships between multiple cpt's much cleaner. Is there a technical/design reason not to support it this way?
Also: in similar situations like in get_posts(), WordPress works the same, allowing both single post_types and arrays of post_types.
Best,
Aart Jan
-
AuthorPosts