Forum Replies Created
-
AuthorPosts
-
November 9, 2018 at 3:56 AM in reply to: โ Slow loading and response time of 'editor screen' #11898
FED
ParticipantAh, I wasn't sure if there was another other unreleased version ๐
Thanks!
November 7, 2018 at 9:32 PM in reply to: โ Slow loading and response time of 'editor screen' #11878FED
ParticipantHi, I'd love to get in on this as beta version as well. I'm experiencing a very similar issues, as I also have a ton of grouped and conditional metaboxes.
Thanks!
FED
ParticipantThank you! I had to make a couple of modifications to what you posted, but your changes definitely helped! Posting the final(ish) version here in case someone else ever runs into this.
FED
ParticipantThanks for troubleshooting this with me. I'm at the point now where I can see the fields I want in the admin... but when I try and save the post, I get a bunch of notices and the post won't save
(Notice: Undefined index: clone in /phila.gov/wp/wp-content/plugins/meta-box/inc/meta-box.php on line 301). Here's what I'm working with on the latest version of metabox:if ( class_exists( 'RWMB_Field' ) ) { class RWMB_Unit_Field extends RWMB_Checkbox_List_Field { public static function normalize( $field ) { if( isset($_GET['post']) && get_post($_GET['post']) && isset($_GET['action']) && 'edit' == $_GET['action'] ) $post = get_post($_GET['post']); if( isset($post) && !empty($post->post_type) && is_object_in_taxonomy($post->post_type, 'category') ){ foreach ( (array) get_the_category($post->ID) as $cat ) { if ( empty($cat->slug ) ) continue; //get data out of term meta field for use later $units[] = rwmb_meta( 'department_units', array( 'object_type' => 'term' ), $cat->term_id); } } if ( !isset( $units ) ) return; foreach ($units as $key => $value){ foreach($value as $name) { $options[] = array( 'value' => urlencode($name['name']), 'label' => $cat->name . ' - ' . $name['name'] ); } } $field = parent::normalize( $field ); return $field; } /*Old, working version public static function filter_options( $field, $options ) { $current_cats = get_the_category(); foreach($current_cats as $cat){ $units[$cat->name] = rwmb_meta( 'department_units', array( 'object_type' => 'term' ), $cat->term_id ); } if ( !isset( $units ) ) return; $options = []; foreach ($units as $key => $value){ foreach($value as $name) { $options[] = (object) array( 'value' => urlencode($name['name']), 'label' => $key . ' - ' . $name['name'] ); } } return $options; } */ } }FED
ParticipantOk, I'm having some trouble updating my custom field to override the
format_single_valuemethod in the RWMB_Choice_Field. I'm extending theRWMB_Input_List_Fieldclass because I want a list of checkboxes. Basically, I want to be able to pre-fill the checkbox options after a user as applied a Category to a CPT.However, I'm getting
Undefined index: multiplewhen I try to do that. I guess that makes sense because I'm using multiple values, but trying to override theformat_single_valuemethod. Is there another method inRWMB_Input_List_Fieldthat I should be using instead?Thanks in advance.
P.S. I can make a new post if that is preferred.
FED
ParticipantAh, I was building off the old version of the plugin, so no wonder this stopped working when I updated. Thanks for your prompt reply!
FED
ParticipantScratch that! I updated wordpress and plugins at the same time. It looks to be a problem in metabox 4.15.0 and up. I was testing on 4.15.2 and it was still not working there. Rolling back to 4.14.11 fixes the problem.
FED
ParticipantAh, ok. Thanks!
FED
ParticipantThanks for the reply. Yes, the same code had been set up on the imported site. Everything about the site was identical, except for the content.
We ended up doing a mySQL dump of the content and importing it directly into the database. That did work, but wasn't exactly ideal.
All the other fields came in as expected, it was only the cloneable ones that had this issue.
FED
ParticipantHi Anh,
Any updates on this issue?
Thanks
FED
ParticipantI'm also in need of a solution to this issue. If possible, an ideal fix would work for any level of group-nesting.
Thanks!
FED
Participant"Save Draft" is no longer an option once a page has been published. Published pages can either be previewed or updated. Currently, if you update a MetaBox on a published page and click "Preview" the changes do not appear in the preview.
May 9, 2016 at 8:04 PM in reply to: Presence of 'is_child' causes warnings on non-post pages and new, unsaved posts #3033FED
ParticipantThank you, Anh!
April 24, 2016 at 12:05 AM in reply to: Include/Exclude unnecessarily alters global $current_user-roles #2893FED
ParticipantThank you!
FED
ParticipantUnderstood. Glad I asked.
-
AuthorPosts