Tagged: 

Viewing 5 reply threads
  • Author
    Posts
    • #2673
      kattagami
      Member

      Hello,

      There is maybe a bug with the “New” attribut when you create a metabox.
      For instance, when I use this code to add a metabox + text field in my Custom Post “cadeau” :

      
      <?php
      /*
      Title: Prix
      Description: Prix du cadeau en euros
      Post Type: cadeau
      Capability: administrator
      Context: normal
      Priority: high
      Order: 1
      Locked: true
      Collapse: false
      New: true
      */
      
      piklist( 'field', 
      	array(
      		'type'        => 'text',
      		'scope'       => 'post_meta',
      		'field'       => 'wptech_cadeau_prix',
      		'label'       => __( 'Prix' , 'texdomain' ),
      		'description' => __( 'Maximum 150 €' , 'texdomain' ),
      		'help' 		  => __( 'Prix du cadeau en euros. Indiquer uniquement un chiffre.' , 'texdomain' ),
      		'attributes'  => array(
      			'class' => 'wpatech-cadeau-prix'		),
      		'position'    => 'wrap'
      		)
      );
      

      The metabox doesn’t display in my CPT “cadeau” (whatever the value is true or false). If I remove the “New” attribut from the comment, my metabox appears.

    • #2725
      Steve
      Keymaster

      @kattagami– It looks like there’s a bug using NEW and WorkFlow tabs, but I just tested without the Workflow and it worked fine. Are you using WorkFlow tabs?

    • #2742
      kattagami
      Member

      In my case, this bug appends with and without workflow.

      For instance, if you test the demo plugin available in this thread:
      https://piklist.com/support/topic/bugs-with-validation/

      … where there is no Workflow, and add the “New: true” attribut in the top comments, the metabox disappears.

    • #2743
      Steve
      Keymaster

      @kattagami– Do you want the metabox to be available when the post is new?

    • #2744
      kattagami
      Member

      Yes…
      But in fact I don’t really need this features at the moment. I just notice the bug so I wrote this message to let you know and to check if it’s a reproducible bug.

    • #2750
      Steve
      Keymaster

      @kattagami– Thanks! Will fix.

Viewing 5 reply threads
  • The topic ‘Bug with the "New" attribut when creating a metabox in a CPT’ is closed to new replies.