• Resolved Niazai

    (@dr-hack)


    When a vendor logs in and clicks “Add product” they are given a blank screen, if i turn on debug mode, following errors are recorded …

    Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /wp-content/plugins/edd-fes/classes/fields/checkbox.php:123 Stack trace: #0 /wp-content/plugins/edd-fes/classes/fields/checkbox.php(123): in_array('Yes', '') #1 /wp-content/plugins/edd-fes/classes/abstracts/class-form.php(273): FES_Checkbox_Field->render_field_frontend(6914, false) #2 /wp-content/plugins/edd-fes/classes/frontend/class-forms.php(357): FES_Form->render_form_frontend(6914, false) #3 /wp-content/themes/mayosis/fes_templates/frontend-new-product.php(3): FES_Forms->render_submission_form() #4 /wp-includes/template.php(772): require('/home/drhackne/...') #5 /wp-content/plugins/edd-fes/classes/frontend/class-templates.php(161): load_template('/home/root/...', false) #6 /wp-content/plugins/edd-fes/classes/frontend/class-templates.php(112): FES_Templates->fes_locate_template(Array, true, false) #7 /wp-content/plugins/edd-fes/classes/frontend/class-dashboard.php(187): FES_Templates->fes_get_template_part('frontend', 'new-product') #8 /wp-includes/shortcodes.php(356): FES_Dashboard->display_fes_dashboard('', '', 'fes_vendor_dash...') #9 [internal function]: do_shortcode_tag(Array) #10 /wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(fes_ve...', 'do_shortcode_ta...', '[fes_vendor_das...') #11 /wp-includes/class-wp-hook.php(307): do_shortcode('[fes_vendor_das...') #12 /wp-includes/plugin.php(191): WP_Hook->apply_filters('[fes_vendor_das...', Array) #13 /wp-includes/post-template.php(253): apply_filters('the_content', '[fes_vendor_das...') #14 /wp-content/themes/mayosis/page.php(107): the_content() #15 /wp-includes/template-loader.php(106): include('/home/drhackne/...') #16 /wp-blog-header.php(19): require_once('/home/root/...') #17 /index.php(17): require('/home/root/...') #18 {main} thrown in /wp-content/plugins/edd-fes/classes/fields/checkbox.php on line 123

    It’s an old store where i am only updating plugins as updates are rolled out. Any guidance as to where to look for will be appreciated.

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Mihai Joldis

    (@misulicus)

    Hi there,

    Could you please let me know what version of Frontend Submissions are you running on the site?

    • This reply was modified 2 years, 3 months ago by Mihai Joldis.
    Thread Starter Niazai

    (@dr-hack)

    Hello,
    FES version is 2.7.2.

    Thanks

    Plugin Support Mihai Joldis

    (@misulicus)

    Hi @dr-hack

    I apologize for that, what about the Checkout Fields Manger version?

    Plugin Support Mihai Joldis

    (@misulicus)

    I’m sorry to hear your having an issue with the submission form.
    While I’m not able to replicate this on my base install of Easy Digital Downloads and FES it would be great if you can set up a staging site and change the theme to a default one from WordPress and test the form submission page like that to rule out an outdate theme file.

    Thread Starter Niazai

    (@dr-hack)

    Hello,

    Checkout Fields Manager wasn;t installed, I just did and the version is 2.2
    After using a default wp theme , getting the following errors :
    Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /wp-content/plugins/edd-fes/classes/fields/checkbox.php:123 Stack trace: #0 /wp-content/plugins/edd-fes/classes/fields/checkbox.php(123): in_array('Yes', '') #1 /wp-content/plugins/edd-fes/classes/abstracts/class-form.php(273): FES_Checkbox_Field->render_field_frontend(6914, false) #2 /wp-content/plugins/edd-fes/classes/frontend/class-forms.php(357): FES_Form->render_form_frontend(6914, false) #3 /wp-content/plugins/edd-fes/templates/frontend-new-product.php(2): FES_Forms->render_submission_form() #4 /wp-includes/template.php(772): require('/home//...') #5 /wp-content/plugins/edd-fes/classes/frontend/class-templates.php(161): load_template('/home//...', false) #6 /wp-content/plugins/edd-fes/classes/frontend/class-templates.php(112): FES_Templates->fes_locate_template(Array, true, false) #7 /wp-content/plugins/edd-fes/classes/frontend/class-dashboard.php(187): FES_Templates->fes_get_template_part('frontend', 'new-product') #8 /wp-includes/shortcodes.php(356): FES_Dashboard->display_fes_dashboard('', '', 'fes_vendor_dash...') #9 [internal function]: do_shortcode_tag(Array) #10 /wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(fes_ve...', 'do_shortcode_ta...', '[fes_vendor_das...') #11 /wp-includes/class-wp-hook.php(307): do_shortcode('[fes_vendor_das...') #12 /wp-includes/plugin.php(191): WP_Hook->apply_filters('[fes_vendor_das...', Array) #13 /wp-includes/blocks/post-content.php(55): apply_filters('the_content', '[fes_vendor_das...') #14 /wp-includes/class-wp-block.php(255): render_block_core_post_content(Array, '[fes_vendor_das...', Object(WP_Block)) #15 /wp-includes/class-wp-block.php(241): WP_Block->render() #16 /wp-includes/blocks.php(901): WP_Block->render() #17 /wp-includes/blocks.php(939): render_block(Array) #18 /wp-includes/block-template.php(240): do_blocks('<!-- wp:templat...') #19 /wp-includes/template-canvas.php(12): get_the_block_template_html() #20 /wp-includes/template-loader.php(106): include('/home//...') #21 /wp-blog-header.php(19): require_once('/home//...') #22 /index.php(17): require('/home//...') #23 {main} thrown in /wp-content/plugins/edd-fes/classes/fields/checkbox.php on line 123

    thanks

    Thread Starter Niazai

    (@dr-hack)

    So, I thought if i can list product through the admin dashboard, when I go to add new Download ,
    the section under “Frontend Submissions” , show the following error :

    Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /wp-content/plugins/edd-fes/classes/fields/checkbox.php:80 Stack trace: #0 /wp-content/plugins/edd-fes/classes/fields/checkbox.php(80): in_array('Yes', '') #1 /wp-content/plugins/edd-fes/classes/abstracts/class-form.php(182): FES_Checkbox_Field->render_field_admin(1, false) #2 /wp-content/plugins/edd-fes/classes/admin/downloads/class-edit-download.php(290): FES_Form->render_form_admin() #3 /wp-admin/includes/template.php(1401): FES_Edit_Download->render_form(Object(WP_Post), Array) #4 /wp-admin/includes/post.php(2303): do_meta_boxes(Object(WP_Screen), 'normal', Object(WP_Post)) #5 /wp-admin/edit-form-blocks.php(314): the_block_editor_meta_boxes() #6 /wp-admin/post-new.php(72): require('/...') #7 {main} thrown in /wp-content/plugins/edd-fes/classes/fields/checkbox.php on line 80

    hope it can shed more light and help in getting it sorted
    thanks

    Thread Starter Niazai

    (@dr-hack)

    Hello,
    So I was using Php 8.0 for the website, changing the version to Php 7.4 resolves the issue and the site starts rendering the Add product page all fine and the errors also vanish.
    Enabled extensions under Php 7.4 and php 8.0 are same /identical still the issue.
    Same errors(as shared above) if I select php 8.1.

    Will be using 7.4 for now, but 7.4 breaks down Mycryptocheckout plugin which I am using with EDD.

    Plugin Support Mihai Joldis

    (@misulicus)

    Hey @dr-hack

    We have logged this as an issue and our team will investigate it further. I hope to see a fix for it in a future release of the Extension.

    Thread Starter Niazai

    (@dr-hack)

    Thanks alot, will be looking forward

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Error in Add product on Vendor Dashboard’ is closed to new replies.