Updates from REST aren't applied when using Custom Table

Support MB Custom Table Updates from REST aren't applied when using Custom Table

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #41192
    Shalom PenningtonShalom Pennington
    Participant

    Changes aren't being stored when using custom table. If I switch to just using default storage these EXACT same REST calls work exactly as expected. This is causing all kinds of heartburn. Is this a bug or is there some other setting that needs to be set? Making changes through WP admin works fine and data is written to custom table just fine. Problem is my use case relies HEAVILY on REST. Running MB v5.6.18 and MB AIO v1.20.0

    Original value:

    {
        "meta_box": {
            "file_key": "123123",
            "file_name": "Basement"
        }
    }

    What I'm posting to CPT endpoint: (domain.local/wp-json/wp/v2/cpt_slug/428)

    {
        "meta_box": {
            "file_key": "123123",
            "file_name": "Basement NEW"
        }
    }

    What POST response shows: (abbreviated for clarity)

    {
        "meta_box": {
            "file_key": "123123",
            "file_name": "Basement NEW"
        }
    }

    What a GET request to same endpoint shows:

    {
        "meta_box": {
            "file_key": "123123",
            "file_name": "Basement"
        }
    }
    #41208
    PeterPeter
    Moderator

    Hello,

    Thanks for your feedback.

    I can see that issue on my demo site and I've escalated it to the development team to check and fix the issue in the next update.

    #41372
    CameronCameron
    Participant

    Seeing the same issue here.

    My existing Custom Fields in Custom Tables will only update via the Admin section, but not REST.

    Also possibly related: for any new Custom Fields Groups created with Custom Tables, Metabox will not create the table in the database and will simply save the data the standard way to wp_postmeta.

    #41416
    CameronCameron
    Participant

    Peter, do you see a fix for this coming in the next version update? I wanted to ask before I start looking into options to update the custom table database directly.

    Updating Custom Tables via REST is a huge part of our use case.

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