New Custom Field Group Warning: 'field IDs do not match the custom table'

Support › MB Custom Table › New Custom Field Group Warning: 'field IDs do not match the custom table'

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #50210

    We have an existing Meta Box custom-table field group that has been in production for some time.

    The custom table was originally created while Auto create table was enabled. As development progressed, we moved to managing the database schema manually and disabled Auto create table.

    The current field-group settings are:
    Auto create table: Disabled
    Storage type: Custom Table

    The Meta Box custom field group currently contains:
    100 actual data-storage fields

    The physical database table currently contains:
    100 columns matching the current data-storage field IDs

    We manually compared the current Meta Box field IDs against the physical database columns and found no missing current field IDs.

    However, after the recent addition of the Edit Table Schema feature, the field group now displays a new warning message:
    “100 field IDs do not match the custom table. Update the field IDs to match columns, or update the schema.”

    We have flushed object/memcache, but the warning persists.

    Our question is:
    How should an existing custom table that was originally auto-created, but is now manually managed with Auto Create disabled, be synchronized with the new Builder schema metadata without altering the physical database table?

    We would particularly like to avoid enabling Auto Create if doing so could cause Meta Box to alter the existing data types or indexes.

    Thank you for any assistance you can provide.

    #50215
    PeterPeter
    Moderator

    Hello,

    Thanks for reaching out.

    If you want to save the custom fields to the created custom table, just make sure the custom field IDs (including field group prefix) match the column names in the database.
    Refer to the documentation https://docs.metabox.io/extensions/mb-custom-table/#using-existing-tables

    #50216

    Thank you for your feedback Peter,

    To follow up and request your further review -- a few more details --

    - The error we see on the field group screen: "100 field IDs do not match the custom table. Update the field IDs to match columns, or update the schema." only appeared recently
    - Our custom fields still read / write data in our custom table without error
    - All 100 Meta Box field IDs match exactly to the names in the custom table
    - Our field group prefix is blank in Meta Box Advanced settings and is also blank in our field names in the custom table

    However, Meta Box started reporting only recently:
    "100 field IDs do not match the custom table."

    In the modal dialog that opens when clicking the "update the schema" link, all 100 fields have a "+" icon and are proposed as TEXT even though those physical columns already exist and are operating without error.

    Do we need to refresh the Builder's schema recognition for this table? Since this is a production table with live data we have not clicked the "Update Schema" button on the dialog.

    Could you help us with the steps for getting the table re-synced so the error is resolved?

    Thank you for your help.

    #50219
    PeterPeter
    Moderator

    Hello,

    Please share your site admin account by submitting this contact form https://metabox.io/contact/

    I will take a look. Thank you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.