Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Dropzone not working #5669

Open
tomjrjones opened this issue Sep 18, 2024 · 3 comments
Open

[Bug] Dropzone not working #5669

tomjrjones opened this issue Sep 18, 2024 · 3 comments
Labels

Comments

@tomjrjones
Copy link

Bug report

What I did

Added dropzone as crud field

      CRUD::field([
        'label' => 'Image Gallery',
        'name' => 'image_gallery',
        'type' => 'dropzone',
        'withFiles' => array(
          'disk' => 's3',
          'path' => $storagePath
        ),
        'tab' => 'General'
      ]);

What I expected to happen

??

What happened

On the FE I get [object Object] error, and also this error

2

#2 upload (ajax) (21:06:34)
8.3.10
20.61ms
2MB
POST admin/product/dropzone/upload
No query results for model [App\Models\Product] 0
vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php#506
Illuminate\Database\Eloquent\ModelNotFoundException
503
504
505
506 
507
508
509
510
        }

        if (is_null($result)) {
            throw (new ModelNotFoundException)->setModel(
                get_class($this->model), $id
            );
        }

What I've already tried to fix it

use dropzone locally without s3 button, if the images are already uploaded, dropzone shows the previewed images.

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there?

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

8.3.10

### PHP EXTENSIONS:
Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, FFI, fileinfo, filter, ftp, gd, gettext, gmp, json, iconv, intl, SPL, ldap, mbstring, session, standard, odbc, pcntl, exif, mysqlnd, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, readline, Reflection, mysqli, shmop, SimpleXML, soap, sockets, sodium, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, Zend OPcache

### LARAVEL VERSION:
11.18.1.0

### BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.5
backpack/crud: 6.7.37
backpack/devtools: 3.1.5
backpack/generators: v4.0.5
backpack/pro: 2.2.17
backpack/theme-tabler: 1.2.11```
Copy link

welcome bot commented Sep 18, 2024

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use GitHub Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

  • Bug Reports, Feature Requests - GitHub Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

@karandatwani92
Copy link
Contributor

Hey @tomjrjones

Do you mean it works on a local disk but not on s3?

@tomjrjones
Copy link
Author

@karandatwani92 It works on neither, get the above error when uploading to local disk or s3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants