• It appears that the Types v1.0.3 plugin’s Import infrastructure is setting radio button values to NULL instead of 0.

    The Export correctly sets the value to 0, but the import is setting values which should be 0 to NULL (the field is created, but it has a default value = NULL).

    Here’s a sample Types export XML block:

    <field>
      <id>my_radio_field_id</id>
      <slug>my_radio_field_id</slug>
      <type>radio</type>
      <name>My Radio Field - Name</name>
      <description></description>
      <data>
        <options>
          <wpcf-fields-radio-option-538700370>
            <title>-2</title>
            <value>-2</value>
            <display_value>-2</display_value>
          </wpcf-fields-radio-option-538700370>
          <wpcf-fields-radio-option-1575409129>
            <title>-1</title>
            <value>-1</value>
            <display_value>-1</display_value>
          </wpcf-fields-radio-option-1575409129>
          <wpcf-fields-radio-option-1573534223>
            <title>0</title>
            <value>0</value>
            <display_value>0</display_value>
          </wpcf-fields-radio-option-1573534223>
          <default>wpcf-fields-radio-option-1573534223</default>
          <wpcf-fields-radio-option-1845948937>
            <title>1</title>
            <value>1</value>
            <display_value>1</display_value>
          </wpcf-fields-radio-option-1845948937>
          <wpcf-fields-radio-option-191763206>
            <title>2</title>
            <value>2</value>
            <display_value>2</display_value>
          </wpcf-fields-radio-option-191763206>
        </options>
        <display>db</display>
        <is_new>1</is_new>
        <disabled_by_type>0</disabled_by_type>
      </data>
    </field>

    IOW, in the above block, the value and title for this radio button option are set to NULL instead of 0:

    <wpcf-fields-radio-option-1573534223>
            <title>0</title>
            <value>0</value>
            <display_value>0</display_value>
          </wpcf-fields-radio-option-1573534223>

    My workaround: after importing the types XML, which seems to set everything else correctly–manually update the radio buttons, with the missing 0 values to include 0 title & value data. I’ve got 10 of these radio button field groups, so I have to do it 10 times, which takes about a minute each time I import.

    [OT]
    On a somewhat related note, I did a MySQL data dump, and discovered that the Field Groups were created, but the fields themselves were skipped. I think it’s because I didn’t do the data dump from the ROOT user (I used the WP_USER and password). For this reason, I needed to execute the Types Export/Import infrastructure.

    https://www.ads-software.com/extend/plugins/types/

  • The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] Import skipping radio button’ is closed to new replies.