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

Error when updating a resource after deleting an image #838

Closed
unlikenesses opened this issue Oct 11, 2018 · 4 comments
Closed

Error when updating a resource after deleting an image #838

unlikenesses opened this issue Oct 11, 2018 · 4 comments
Milestone

Comments

@unlikenesses
Copy link

unlikenesses commented Oct 11, 2018

  • Laravel Version: 5.7.8
  • Nova Version: 1.1.3
  • PHP Version: 7.1.18

Description:

Deleting an image in a resource then immediately updating the resource produces this error:

Another user has updated this resource since this page was loaded

Steps To Reproduce:

  1. Add a resource with an image
  2. Delete the image
  3. Click Update.
@cdupoiron
Copy link

Any news on this bug? I can reproduce

Laravel Version: 5.7.28
Nova Version: 1.3.2
PHP Version: 7.2.15

@cdupoiron
Copy link

Hello @unlikenesses , did you find a solution?

@a2sc
Copy link

a2sc commented Apr 30, 2019

Same issue with the Laravel\Nova\Fields\File when deleting a file in the edit form I have the same error message:

Another user has updated this resource since this page was loaded

Here is the code in App\Nova\Product@fields:

File::make('PDF', 'pdf_file')
        ->rules('file', 'mimes:pdf', 'max:10240')
        ->help('PDF file only. Maximum 10Mo.')
        ->disk('public')
        ->path('pdfs')
        ->storeAs(function (Request $request) {
             return $request->pdf_file->getClientOriginalName();
        })
       ->storeSize('pdf_filesize')
       ->disableDownload()
       ->onlyOnForms(),
  • Local environment
  • PHP 7.2.14
  • Laravel Framework 5.8.14
  • Laravel Nova 2.0.0

@jbrooksuk jbrooksuk added this to the v1.0 milestone Aug 1, 2019
@jbrooksuk
Copy link
Member

This issue relates to an unsupported version of Nova. If you're still experiencing this in the latest version of Nova, please open a new ticket, thanks!

@a2sc I can see that you've re-produced this in v2, could you please create a new issue.

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

No branches or pull requests

4 participants