• Resolved lucytech

    (@lucytech)


    I just installed the plugin and tried to access the download link but I got an error:

    GravityExport Lite: Something is broken

    Include the following details in your message:

    • Plugin Version: 2.3.5
    • Gravity Forms Version: 2.9.0
    • PHP Version: 8.1.31
    • WordPress Version: 6.7.1
    • Error message: Uncaught TypeError: implode(): Argument #1 ($array) must be of type array, string given in /home1/iuqvuxmy/public_html/wp-content/plugins/gravityforms/includes/fields/class-gf-field-fileupload.php:929
      Stack trace:
      #0 /home1/iuqvuxmy/public_html/wp-content/plugins/gravityforms/includes/fields/class-gf-field-fileupload.php(929): implode(‘ , ‘, NULL)
      #1 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Field/AbstractField.php(140): GF_Field_FileUpload->get_value_export(Array, ’33’, false, false)
      #2 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Field/AbstractField.php(114): GFExcel\Field\AbstractField->getGFieldValue(Array, ’33’)
      #3 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Field/FileUploadField.php(98): GFExcel\Field\AbstractField->getFieldValue(Array, ’33’)
      #4 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Field/FileUploadField.php(76): GFExcel\Field\FileUploadField->getFieldValue(Array)
      #5 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Transformer/Combiner.php(111): GFExcel\Field\FileUploadField->getRows(Array)
      #6 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/Transformer/Combiner.php(37): GFExcel\Transformer\Combiner->getFieldRows(Object(GFExcel\Field\FileUploadField), Array)
      #7 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/GFExcelOutput.php(245): GFExcel\Transformer\Combiner->parseEntry(Array, Array)
      #8 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/GFExcelOutput.php(126): GFExcel\GFExcelOutput->setRows()
      #9 /home1/iuqvuxmy/public_html/wp-content/plugins/gf-entries-in-excel/build/vendor_prefixed/gravitykit/gravityexport-lite-src/GFExcel.php(355): GFExcel\GFExcelOutput->render()
      #10 /home1/iuqvuxmy/public_html/wp-includes/class-wp-hook.php(324): GFExcel\GFExcel->downloadFile(Object(WP))
      #11 /home1/iuqvuxmy/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
      #12 /home1/iuqvuxmy/public_html/wp-includes/plugin.php(565): WP_Hook->do_action(Array)
      #13 /home1/iuqvuxmy/public_html/wp-includes/class-wp.php(418): do_action_ref_array(‘parse_request’, Array)
      #14 /home1/iuqvuxmy/public_html/wp-includes/class-wp.php(813): WP->parse_request(”)
      #15 /home1/iuqvuxmy/public_html/wp-includes/functions.php(1336): WP->main(”)
      #16 /home1/iuqvuxmy/public_html/wp-blog-header.php(16): wp()
      #17 /home1/iuqvuxmy/public_html/index.php(17): require(‘/home1/iuqvuxmy…’)
      #18 {main}
      thrown
    • Error stack trace:#0 [internal function]: GFExcel\Renderer\AbstractPHPExcelRenderer->fatalHandler()
      #1 {main}
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Doeke Norg

    (@doekenorg)

    Hi @lucytech,

    Sorry about that. That obviously shouldn’t happen. It looks like you have a File Upload field in the output, that at some point does not have any values. I’m going to look into a fix, and will let you know. as soon it has been deployed. In the mean time, removing that field from the output could fix the download url.

    Kind regards,

    Doeke

    Thread Starter lucytech

    (@lucytech)

    Can you tell me how to do that? I’m not sure what you mean.

    I didn’t change any settings just installed the plugin and tried to use the link.

    Plugin Author Doeke Norg

    (@doekenorg)

    The download link is located on the Gravity Export Lite settings page for that form. The last section (Field settings) defines the fields that are included in the export (enabled fields). By default it will add all fields.

    You can move some of these fields from “enabled fields” to “disabled fields”, either by clicking the x on the field; or dragging them from one column to the other. You can also drag and drop the fields in the desired order for the enabled fields.

    If you move the upload field to “disabled fields” (and save the page) it should hopefully fix the download link for now.

    Hope this helps.

    Plugin Author Doeke Norg

    (@doekenorg)

    @lucytech It looks like this issue is actually a Gravity Forms issue; one that I cannot fix on our end.

    As far as I can see, you might have a form field that changed from a single upload to a multiple upload, or just has invalid data in the database. This causes Gravity Forms to behave in an unforeseen way. I’ll let them know about this issue.

    A solution for you could be to duplicate your current form. This will not have the current entries, and should therefor work from that point on. Sorry about the inconvenience.

    Thread Starter lucytech

    (@lucytech)

    Yes, I was using the?regular single upload and now I’m using gravity perks multi upload, with limit 1 on some fields and on others it is a multi-field.

    https://gravitywiz.com/documentation/gravity-forms-file-upload-pro/#why-is-the-8220-multiple-files-8221-setting-required-when-file-upload-pro-is-enabled

    does it not work with that? 

    It is not going to work for me to duplicate the form. Is there another work-a-round??Should I run a database cleanup?

    I would like to use this plugin. 

    Plugin Author Doeke Norg

    (@doekenorg)

    @lucytech This plugin should work fine with that. The problem is that you have data in you database for a single upload, this is basically just a URL. When setting the field to “multi upload” Gravity Forms expects a JSON blob. But for the old entries, that isn’t the case. This results in a JSON decode of invalid JSON, which return null. That is not a valid input for the implode() function they call; and that is where the error originates. So it actually doesn’t have anything to do with GravityExport in this case, or with GravityWiz for that matter.

    For now I only see a solution in changing the Gravity Forms source code, but that will be overwritten when you update the plugin. Or updating your database. In that case you would need to find all the gf_entry_meta where the form_id matches, and the meta_key is your upload field ID. Any entries that only have a url, and not JSON should be updated. So if the entry contains https://the-url/etc it should be updated to ["https://the-url/etc"].

    I looked into GravityExport if there are any hooks I could call to change the input of the entry, but unfortunately there is not.

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