getkirby / kirby

Kirby's core application folder
https://getkirby.com
Other
1.31k stars 168 forks source link

Panel runs out of memory with files field in User blueprint #1556

Closed frederikbrudy closed 5 years ago

frederikbrudy commented 5 years ago

Describe the bug Panel runs out of memory when using a field of type: files in a User blueprint. The following error message is displayed as popyp when clicking "save":

The form could not be saved
Exception: Whoops\Exception\ErrorException
    Allowed memory size of 134217728 bytes exhausted (tried to allocate 53248 bytes) 

To Reproduce

  1. Use a fresh Kirby starterkit
  2. Add a files field to a user blueprint, e.g. use the following in site->users->default.yml
    
    title: User

sections: files: type: files content: type: fields fields: gallery: type: files

4. Upload a file to a user
5. Select a file in the gallery field
6. Click "Save"

**Expected behavior**
The User is saved correctly.

**Kirby Version**
Kirby 3.0.3

**Console output**

code: 1 ​ details: null ​ exception: "Whoops\Exception\ErrorException" ​ file: "\folder-to-project\kirby\vendor\mustangostang\spyc\Spyc.php" ​ line: 301 ​ message: "Allowed memory size of 134217728 bytes exhausted (tried to allocate 225280 bytes)" ​ status: "error"



**Desktop (please complete the following information):**
Windows, XAMPP with PHP Version 7.2.4

**Additional context**
Seems to be the same bug as in #1443, but with User blueprints this time. 
bastianallgeier commented 5 years ago