The error is caused by the fieldName value being provided in the POST request to upload the file, which will have a null for the data-repeatable-identifier value (e.g., null#image_front instead of items#image_front).
What I've already tried to fix it
The issue is in how the $dropzoneConfig.paramName value is calculated in dropzone.blade.php. The current implementation assumes that the node with the data-repeatable-identifier attribute will always be two levels up:
Bug report
What I did
I'm formatting my CRUD form using custom_html field types that include
<div>
tags.What I expected to happen
I expect that when I drag-and-drop an image into the dropzone, it will accept my upload.
What happened
A javascript error is thrown
The error is caused by the
fieldName
value being provided in the POST request to upload the file, which will have anull
for the data-repeatable-identifier value (e.g.,null#image_front
instead ofitems#image_front
).What I've already tried to fix it
The issue is in how the
$dropzoneConfig.paramName
value is calculated indropzone.blade.php
. The current implementation assumes that the node with thedata-repeatable-identifier
attribute will always be two levels up:By adding the
<div>
tags, this is no longer the case and causes the error. I was able to fix this by using closest() instead of parentNode:Is it a bug in the latest version of Backpack?
I don't have the latest version of Pro, but I don't see any closed issues related to this issue.
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is: