Custom Field empty after saving

Support Meta Box AIO Custom Field empty after savingResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #33412
    BenBen
    Participant

    Hey guys,

    I have created a custom field for woocommerce products using Meta Box. Shortly after that I decided to rename the custom field and therefore also adjusted the ID. Unfortunately, since then I have the problem that the field can no longer be filled.

    I enter the content of the Woocommerce article into the field, save the product and after reloading the page the field is empty again.

    How can I solve the problem?
    Deleting and recreating the field (with the same name and ID) did not solve the problem.

    Thanks already once.

    #33423
    Long NguyenLong Nguyen
    Moderator

    Hi Ben,

    You can follow this article to increase the PHP setting max_input_vars https://metabox.io/wordpress-custom-fields-not-saving-increase-max-input-vars/

    If it does not help, please share the code that creates the field on your site. I will check it on my end.

    #33427
    BenBen
    Participant

    Hey Long,

    I was able to solve the problem myself.
    It seems that when the ID was changed, some old ID names remained in the database. It helped to replace all the old ID names in the database with the new one.

    #48558
    JordanJordan
    Participant

    @Ben how did you go about changing the old IDs with new ones? And why did this happen? I'm having the same issues but don't think I named anything the same in the custom fields.

    Now metabox CPT aren't working at all across multiple websites in Bricks...something is going on.

    #48559
    BenBen
    Participant

    Hey Jordan,

    to be honest - I can't remember. This was more than 3.5 years ago.
    But I guess I couldn't find a reason or solution for this.

    I just don't try to better name the custom fields to not need to rename them afterwards.
    Never again tried to rename custom fields due to the problems I constantly had then.

    If I were in your situation, I would probably import a backup to get everything up and running again.
    If you still want to rename the fields afterwards, simply create a new one and migrate the data to the new field. You can then delete the old custom field.

    However, this has the disadvantage that you will have to make some changes to the website. Maybe this works via search & replace in the database. But I never tested this.

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