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] The file field that was used within the relationship's subfields, was not sent with the request #4676

Closed
RoliJ opened this issue Sep 20, 2022 · 4 comments
Labels

Comments

@RoliJ
Copy link

RoliJ commented Sep 20, 2022

Bug report

What I did

I added a File field to my relationship field's subfields, using the website's instructions.

What I expected to happen

I expected the file's name be inserted to the database and I have the file on my disk.

What happened

None of the aforementioned expectations were satisfied, because backpack didn't added enctype="multipart/form-data" to the main form tag.

What I've already tried to fix it

I did nothing to fix that. But, when the user clicks on the "+ New Item" button, this propert should be added to the main form tag (in case there isn't a file field available inside the non-subfields).

Is it a bug in the latest version of Backpack?

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

Backpack, Laravel, PHP, DB version

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

PHP VERSION:

PHP 7.4.9

LARAVEL VERSION:

v8.83.23

BACKPACK VERSION:

5.3.12

@RoliJ RoliJ added the triage label Sep 20, 2022
@welcome
Copy link

welcome bot commented Sep 20, 2022

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

@pxpm
Copy link
Contributor

pxpm commented Sep 20, 2022

Hello @RoliJ

Thanks for the report.

Unfortunatelly the problem is a abit more extensive than adding the encoding in the form and we are aware of it, and plan to fix it by developing a new upload field ajax based. 🙏

#4141

There is also the mutator issue, the re-rendering etc.

I will be closing this issue, if you test around and found something that we might be missing, please write on that issue I mentioned, so we keep the conversation regarding this issue in a single place.

Thanks again

@pxpm pxpm closed this as completed Sep 20, 2022
@pxpm pxpm moved this to Done in This week Sep 20, 2022
@RoliJ
Copy link
Author

RoliJ commented Sep 20, 2022

@pxpm Thanks for the response. Hope to see this MUST feature very soon.

@CamusMX7
Copy link

@pxpm
Sorry if it's not the right place.
I have followed this topic in different posts and it is not clear to me: Is this solved in backpack v6 with:
https://backpackforlaravel.com/docs/6.x/crud-uploaders#subfields-in-uploaders-1 ?

Because in the documentation they recommend as correct the option to make it suggested as in backpack v5:
https://backpackforlaravel.com/docs/6.x/crud-fields#upload-1

Is there no longer a problem with the upload field when using it in repeatable subfields?

Is there an up-to-date list of fields that are 100% compatible with the repeatable field?
something like what they commented on:
#3905

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

No branches or pull requests

3 participants