-
Notifications
You must be signed in to change notification settings - Fork 16
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
File upload via frontend is not saved in the event anymore after Calendar update #336
Comments
Craft Version: 4.12.5 Noticed that the issue is in 5.0.7, since we downgraded to 5.0.6 and it was working. |
Sorry for the trouble you're experiencing @jurgenkrol and @shayneg0. When I try this on my end using the demo templates included with Calendar, it seems to work without issue. Can you share what your template code looks like? 🙂 |
Here is a stripped down version of the code:
Everything is saved fine except the image. Replacing name="fields[image][]" with name="fields[image]" doesn't make a difference either. As pointed out by @shayneg0 it still works in version 5.0.6 and below. I think all the changes in version 5.0.7 in packages/plugin/src/Elements/Event.php regarding UploadFile introduced the issue. |
Thanks @jurgenkrol. Can you try changing this line: to this: And let me know if this resolves the issue? 🙂 |
Replacing "calendar/events/save-event" with "calendar/legacy-events/save-event" is what I had already tried. In that situation too, the file is not uploaded and not saved in the event. |
We are experiencing the same issue with Calendar 5.0.7+. At the time of testing, we are running Craft CMS 4.13.6. For our users, we have had a front-end form for many years on our Athletic site, which is only accessible by logging into Craft CMS. In upgrading the site, the form works with Calendar 5.0.6, but not 5.0.7+. Our users update a calendar event with win/loss info and can upload an image from the athletic event with the front-end form. Please let us know if you need any specific info. Is there a fix? |
I'm very sorry for the delay and the trouble @jurgenkrol, @shayneg0 and @phillipsandoveracademy. I will have a developer check into this shortly. I have a hunch about what it might be caused by. 🙂 |
When I create an event via the frontend (with action calendar/events/save-event) fields with file uploads are not saved as an asset in the event.
The form tag contains the attribute enctype="multipart/form-data" and "Allow Guest Access on Front End" is enabled. Of course, the field is also defined as an asset field in the field layout.
This problem arose after an upgrade of Calendar from version 3.3.21 to version 5.0.10 (Craft was also updated from version 3.9.13 to 4.12.6.1). Before that it worked fine.
Craft & Plugin Info:
The text was updated successfully, but these errors were encountered: