Fatal error caused by changing taxonomy field types

Support MB Frontend Submission Fatal error caused by changing taxonomy field types

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43650
    pzapza
    Participant

    I don't know if this is posted about or known.

    But today I ran into a confusing issue where submitting certain posts (via Frontend Submission, boxes built with MB Builder) was causing a fatal error:

    PHP Fatal error: Uncaught TypeError: urlencode(): Argument #1 ($string) must be of type string, array given in /home/.../wp-includes/formatting.php:5663

    After tracking it down to a Taxonomy field, I simply changed the field ID (since this isn't saved for a tax field) and everything worked again.

    It turns out, earlier I had experimented using a different format (select) and changed it (to checkbox tree) for that field.

    It was the posts which I had saved using the previous taxonomy-field-format (ie. select field).

    I'm guessing the field settings get cached somewhere? And caused invalid submission via the frontend form...

    Hopefully it will make sense to you, I'm just reporting it because it was a nightmare.

    And in case anyone has this issue, tldr; just change the name of your taxonomy field.

    #43664
    PeterPeter
    Moderator

    Hello,

    Please export the field group to a JSON file, share it here and let me know how to reproduce the issue. I will check this on my demo site and escalate it to the development team if it is a bug.
    Follow the documentation to export the field group https://docs.metabox.io/extensions/meta-box-builder/#export--import

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