Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 30 total)
  • Author
    Posts
  • in reply to: โœ…Slow loading and response time of 'editor screen' #11898
    FEDFED
    Participant

    Ah, I wasn't sure if there was another other unreleased version ๐Ÿ˜€

    Thanks!

    in reply to: โœ…Slow loading and response time of 'editor screen' #11878
    FEDFED
    Participant

    Hi, 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!

    in reply to: โœ…My custom metabox stops working on WP 4.9.8 #11877
    FEDFED
    Participant

    Thank 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.

    https://ghostbin.com/paste/ytadu

    in reply to: โœ…My custom metabox stops working on WP 4.9.8 #11764
    FEDFED
    Participant

    Thanks 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;
         }
         */
      }
    }
    in reply to: โœ…My custom metabox stops working on WP 4.9.8 #11329
    FEDFED
    Participant

    Ok, I'm having some trouble updating my custom field to override the format_single_value method in the RWMB_Choice_Field. I'm extending the RWMB_Input_List_Field class 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: multiple when I try to do that. I guess that makes sense because I'm using multiple values, but trying to override the format_single_value method. Is there another method in RWMB_Input_List_Field that I should be using instead?

    Thanks in advance.

    P.S. I can make a new post if that is preferred.

    in reply to: โœ…My custom metabox stops working on WP 4.9.8 #11074
    FEDFED
    Participant

    Ah, I was building off the old version of the plugin, so no wonder this stopped working when I updated. Thanks for your prompt reply!

    in reply to: โœ…My custom metabox stops working on WP 4.9.8 #11043
    FEDFED
    Participant

    Scratch 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.

    in reply to: Tabs in a group #8874
    FEDFED
    Participant

    Ah, ok. Thanks!

    in reply to: โœ…Import cloneable fields #4321
    FEDFED
    Participant

    Thanks 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.

    in reply to: Cloneable group with WYSIWYG #4045
    FEDFED
    Participant

    Hi Anh,

    Any updates on this issue?

    Thanks

    in reply to: Cloneable group with WYSIWYG #3893
    FEDFED
    Participant

    I'm also in need of a solution to this issue. If possible, an ideal fix would work for any level of group-nesting.

    Thanks!

    in reply to: Previewing MetaBoxes #3654
    FEDFED
    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.

    FEDFED
    Participant

    Thank you, Anh!

    FEDFED
    Participant

    Thank you!

    in reply to: License Question #2850
    FEDFED
    Participant

    Understood. Glad I asked.

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