-
Notifications
You must be signed in to change notification settings - Fork 296
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
Laravel 5.2.32 or greater breaks form #232
Comments
Hm, that error is really strange for something related to button. Are you attaching some model to the form? |
Yeah. It's just a standard eloquent model. If I lower the Laravel framework to 5.2.31 it works fine.
|
That's really strange. Can you provide me the model content from |
Silly me. I didn't do the toArray(). However it's always worked just passing an object before 5.2.32. |
It should work with object. I just need to see what your media model contains, it will help me debug the issue. Give me var_dump: var_dump($media->toArray()); |
|
Works:
Fails:
|
Are you using any child forms, or collections inside the form? EditMedia form content would be also great to see.
|
If I remove the $this->add('save', 'submit'), the form works perfectly fine. Albeit I can't submit the form. |
I'll check it out. In the meantime, can you try removing |
I've removed the |
Ok thanks for your help. I'll check it out and let you know when i fix it. Until then, please use |
No worries. One of my go to packages for any project. Keep up the good work! |
* Refactor relations and scopes * more refactoring * styleCI
May be related to illuminate/database@2d00f24 ? |
@rikless how that could affect anything here? |
@vincehollywood I found the issue. It's problem with the |
I added a check in latest version (1.7.10), so other users get informed properly. |
The broken behaviour with 5.2.32 is/was a bug in the framework, which I reported here: laravel/framework#13632. It should be fixed in this commit which is in 5.2.36: laravel/framework@8fb89c6 (I have tried the combination of laravel/framework 5.2.36 and laravel-form-builder 1.7.0 and it worked). Can you revert the reserved field name check, as from 5.2.36 onwards the name is not 'reserved'. |
Actually it looks like I spoke too soon. Sorry. This issue: laravel/framework#13632 hasn't been fixed in 5.2.36. |
I'll leave it until we make sure it's fixed in the latest release. I'll reopen it for now. |
The underlying issue has not and most likely will not be fixed, so I guess you can close this issue (the closed pull request for reference: laravel/framework#13750) |
Hi, @kristijanhusak - if this change is contined to be supported, can the documentation at http://kristijanhusak.github.io/laravel-form-builder/field/buttons.html please be updated as it shows a save button by default... and has caused me at least 15 minutes of frustration so far trying to work out why I was getting an error when following the documentation :) |
@csogilvie i fixed it, thanks. |
When updating to Laravel 5.2.32 or greater, I get the following error when trying to display a form with a button. Removing the button works.
The text was updated successfully, but these errors were encountered: