Custom Fields
Re-Envisioned
Support MB Frontend Submission Creating a simple Meta Box and trying to use the shortcode generates save error

  • Creator
    Topic
  • #29546
    Jim Hunter
    Participant

    I have a new WP install with ONLY Meta Box and AIO plugins installed. I created a simple CPT called attendee. I then created 2 custom fields for 'First Name', 'Last Name' in a field group assigned to Attendee. So far, simple. It works as a CPT and I can enter in first/last name info. I added the shortcode, as created by Meta Box, to a test page and tried to update the page, but I always get:

    Updating failed. The response is not a valid JSON response

    If I capitalize the first letter of the ID, the save works, but naturally when you view the page in the front end, it is just a title and content, no custom fields because the field group name did not match exactly. But when it does match, you can't save the page. Here is the shortcode I am trying to use:

    [mb_frontend_form id="attendee_group" post_fields="title,content"]

    Thanks,
    Jim

Viewing 10 replies - 1 through 10 (of 13 total)
  • Author
    Replies
  • #29550
    Long Nguyen
    Moderator

    Hi Jim,

    Thank you for reaching out.

    Can you please share some screenshots of the field groups? You can copy the shortcode in the list group fields board and add it to the shortcode when editing the page.

    Screenshots
    https://share.getcloudapp.com/4gunp9Nk
    https://share.getcloudapp.com/NQuoGr5k

    #29553
    Jim Hunter
    Participant

    Thanks for the quick response! That is exactly what I did, created a field group with 2 fields, copied the shortcode then added it into the page. Then it would not save. I have attached a few shots to illustrate. Scratch that, do not have time to create a place in the cloud to put them, thought I could just attach the images directly. I'll post some images tonight when I get back home, heading out for the day right now.
    I purchased the developer bundle last night, so that is what I am using.

    #29558
    Jim Hunter
    Participant
    #29564
    Long Nguyen
    Moderator

    Hi Jim,

    I've tried to reproduce the issue on my local site but do not see anything wrong. Adding the shortcode to a page and save the content as well.

    Please try to delete the field group, create another one, change the group title to "Attendee Group" and let Meta Box generates the field group ID automatically.

    Or you can try to use the plugin Classic Editor to add the shortcode to the page content.
    https://wordpress.org/plugins/classic-editor/

    Let me know how it goes.

    #29573
    Jim Hunter
    Participant

    Nope, no go. I can save the shortcode to the page, no error (using classic editor), but when you display the page the form does not display. If I use an ID that does not exist, I do get a form that just has the title and content. But if I use an ID of the new group I created, then the form does not display at all. It doesn't matter if I have classic editor enabled or not, the page displays the same. If you want to contact me directly, I can set you up with a login to see what I am seeing?

    Thanks,
    Jim

    #29574
    Long Nguyen
    Moderator

    Hi Jim,

    Please share your site credentials via this contact form https://metabox.io/contact/, I will help you to check the issue.

    #29576
    Jim Hunter
    Participant

    I just sent them, thanks!

    Jim

    #29586
    Ole Poetter
    Participant

    Hi,
    I have the same problem.
    Any solution for this?

    On the page where the shordcode is added, i get following Error:

    Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-yoast-seo/class-mb-yoast-seo.php:21 Stack trace: #0 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-includes/class-wp-hook.php(292): MB_Yoast_SEO->enqueue() #1 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters() #2 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-includes/plugin.php(484): WP_Hook->do_action() #3 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-content/plugins/meta-box/inc/meta-box.php(179): do_action() #4 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-frontend-submission/src/Form.php(82): RW_Meta_Box->enqueue() #5 /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-frontend-submis in /var/www/vhosts/xn--rderkids-n4a.de/test.xn--rderkids-n4a.de/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-yoast-seo/class-mb-yoast-seo.php on line 21

    Yoast Seo is not installed and the MB extension is not active.

    #29587
    Long Nguyen
    Moderator

    @Ole: Please follow this topic https://metabox.io/support/topic/fatal-error-after-last-update/ or create a new one. Your issue looks unrelated to the issue of Jim.

    @Jim: Can you please resend it? I've not received your ticket.

    #29590
    Jim Hunter
    Participant

    My apologies, missed the link to create a 'ticket', I created a general message apparently.
    I just sent a ticket in.

Viewing 10 replies - 1 through 10 (of 13 total)
  • You must be logged in to reply to this topic.