Viewing 3 replies - 1 through 3 (of 3 total)
  • Magic Fields 2 also stores data in its own proprietary MySQL tables.

    mysql> show tables like 'wp_mf%';
    +--------------------------+
    | Tables_in_wp0 (wp_mf%)   |
    +--------------------------+
    | wp_mf_custom_fields      |
    | wp_mf_custom_groups      |
    | wp_mf_custom_taxonomy    |
    | wp_mf_post_meta          |
    | wp_mf_posttypes          |
    +--------------------------+
    5 rows in set (0.00 sec)

    WordPress Exporter may not backup data in these tables as they are not WordPress tables. You should ask the author of WordPress Exporter if it will also backup data in non WordPress, plug-in specific, proprietary tables. I surmise not as this would be a difficult thing to do. Without the proprietary data your backed up posts will not show any Magic Fields 2 data as the proprietary data contains data necessary for the display of Magic Fields 2 fields.

    Thread Starter arehan

    (@arehan)

    Thanx for the info! Actually, the data is there in the Exported file, but does not get imported.

    Does anyone know whether other Custom Field helpers like “Type” stores its data the same way as Magic Fields, or in a more standard way?

    The actual values of the custom fields are stored in the WordPress table wp_postmeta and of course would be in the Exported file. But, in addition to the values of the field, Magic Fields also needs to know the field and group index of the field. (Magic Fields support repeated fields and repeated groups.) These indexes are stored in the proprietary table wp_mf_post_meta.

    mysql> show columns from wp_mf_post_meta;
    +-------------+--------------+------+-----+---------+-------+
    | Field       | Type         | Null | Key | Default | Extra |
    +-------------+--------------+------+-----+---------+-------+
    | meta_id     | int(11)      | NO   | PRI | NULL    |       |
    | field_name  | varchar(255) | NO   |     | NULL    |       |
    | field_count | int(11)      | NO   |     | NULL    |       |
    | group_count | int(11)      | NO   |     | NULL    |       |
    | post_id     | int(11)      | NO   | MUL | NULL    |       |
    +-------------+--------------+------+-----+---------+-------+
    5 rows in set (0.07 sec)

    The columns field_count and group_count are the field index and group index of the custom field with the given meta_id. This information is necessary as a given field name can have multiple rows in wp_postmeta if the field or group is repeated. And even if you did not repeat the group or field the index information is required. Otherwise when you use get( $field_name, $group_index=1, $field_index=1, $post_id=NULL ) to access the field it would fail to find the indexes (in this case [1,1]) in wp_mf_post_meta. Are the index data also in the Exported file?

    Types only use the standard WordPress tables but its feature set is different from Magic Fields 2. In particular, Magic Fields 2 has a very useful related_type field that Types does not have an equivalent for – that was a deal breaker for me.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Backup and restore not working’ is closed to new replies.