Defaults to Location: Post after Publish

Support Meta Box AIO Defaults to Location: Post after PublishResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #35800
    Digital RefreshDigital Refresh
    Participant

    Hello Metabox,

    I am experiencing an interesting bug that I can't figure out. I am currently building a business hours Settings page. I have each weekday bundled into a group, and I have been duplicating and renaming each group as I go. Everything was going well until I got to the last day, Sunday.

    For some reason, if I add the fields for 'Sunday' after I 'publish' the settings > Location switches to "Post Type" "post". No matter how I try to change it back it continues to default back to Location:Post type and it won't let me keep my set location:settings Page.

    Things I have tried:
    1. Clearing the post & site Cache
    2. Recreating the group from scratch rather than by duplicating it.
    3. Exported the entire custom field into a completely different site. (same result)

    Things I have learned troubleshooting:
    1. If I delete the Sunday group it works fine again.
    2. More specifically, everything works if the Sunday group and the opening time exsists but as soon as I add the final time field, Sunday Closing time, it all breaks.

    One thing to note:
    1. My custom settings page is set to show only in the WP Customizer.

    I am not sure why that one time field caused a forced default Location but it does. Here is the exported field https://pastebin.com/i4jS3vdg.

    Please help

    #35801
    Digital RefreshDigital Refresh
    Participant

    Here is the code that works without the Sunday Closing Hours added:
    https://pastebin.com/i4jS3vdg

    Here is the code that breaks the Location rule with the Sunday hours included:
    https://pastebin.com/rJBS314b

    #35808
    Long NguyenLong Nguyen
    Moderator

    Hi,

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

    Let me know how it goes.

    #35841
    Digital RefreshDigital Refresh
    Participant

    That seems to have resolved the issue.
    Thank You!

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