Serialized Data despite checking Clone as multiple

Support MB Group Serialized Data despite checking Clone as multipleResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35437
    Amy SchmidtAmy Schmidt
    Participant

    As the title says, I tried to save my group as a clone with 'multiple' checked, but it is still serializing the data. I started with the custom table and saw an old post saying that wasn't supported yet, so I created a new one and threw the data in postmeta table yet it's still serialized.

    How do you actually save cloned groups on their own row without serializing?

    And if you can't, is there a different way to save groups of data together that I'm missing?

    Thanks

    #35446
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The group field saved data (subfield values) in the database as a serialized array, it is the core feature of the plugin, and not possible to save subfield values in each row like a single field. Please read more on this article: https://metabox.io/create-group-of-custom-fields-with-meta-box-group/#how-does-the-meta-box-group-save-data

    #35463
    Amy SchmidtAmy Schmidt
    Participant

    Ahh, I read that wrong initially.

    After messing with the actual data, it did simply show as an array when I pulled it out which was fine. I am probably going to avoid doing many WP_Query lookups anyway at this point because it's just easier for me to do a wpdb->get than trying to navigate WordPress' WP_Query formula.

    Perhaps I'll watch some WP_Query videos later on to fully understand how that works. I'm sure WP has built-in caching with that (unless I'm wrong?) but it was a nightmare trying to figure it all out.

    Between the serialized data and the issue I had here (https://support.metabox.io/topic/getting-all-data-from-relationship/) it was just quicker to do a LEFT JOIN and pull the fields I needed 🙂 I know that's not the 'WP proper' way to do it, but definitely easier.

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