Needs work
Project:
File Entity (fieldable files)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Jan 2012 at 12:07 UTC
Updated:
16 Aug 2019 at 23:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dave reidThis is not really in the plan as of yet. If you want to work on it, feel free to assign and move out of postponed with a patch.
Comment #2
alan d. commentedFor this project I moved on to Field Collection as we have a 3 week deadline and the project hasn't even been spec'd out yet! It would be an awesome addition to the module (not the biggest fan of the field collection workflow)
Comment #3
weri commentedIt would be great, when the fields of a file entity would added to the widget. The following code adds the fields to every widget with a file field.
This works also with multiple fields. Values correctly submitted and saved. Maybe there are some side effects with other file widget add-ons. Thats the reason why I not submit a patch yet.
Comment #4
weri commentedComment #5
dave reidYeah the problem is that you also have to handle submit. It's not automatic just by calling field_attach_form() - that will only add the form elements and not handle any validation nor submission.
Comment #6
weri commentedI implemented the functionality to add the entity fields to file- and image-field-widgets and save the submitted values. The implementation is added as a patch.
Comment #8
Letharion commentedRe-rolled a patch that hopefully applies, and also complies with coding standards for comments. Let's see what the bot says.
Comment #9
Letharion commentedNice.
@weri, you still deserve the credit, so you may wanna do the re-roll yourself. :)
Comment #10
weri commentedThank you Letharion for cleaning up the patch! It's not necessary that I re-roll the patch. :-)
Comment #11
Shadlington commentedThis patch doesn't seem to have had any visible effect on my install - I assumed from the description that it would add fields that I have added to the file entity to the edit form of a node with a file field attached to it. This does not seem to be the case - the fields on the file entity continue to go unseen.
Comment #12
alan d. commentedFrom first glance, this will not handle images, but is that worthy of a separate issue? Or should a more universal approach be looked at?
Comment #13
burgs commentedAt another first glance - this seems to only work with files uploaded after you implement the patch. Old uploads are still only editable in the files list section.
Comment #14
bojanz commentedBoth Subform and Inline Entity Form attempt to solve this generically, and might be useful at least as a reference.
I used #1 and helped write #2, ping me on IRC if there's info / help I can provide.
Comment #15
mrfelton commentedLooks like Alan D has created a File Attributes module for this in his sandbox . Alan, can you provide some commentry on your module? Are you recommending that this be used? Or, is this functionality likely to get rolled into File Entity?
Comment #16
alan d. commentedRegarding, File Attributes status.
I'm sitting on the fence (in relation to publishing) while waiting for an act of god to free up some developer time to integrate File Entity as the best and only solution for sticking stuff onto files.
However, initial tests have show that the File Attributes sandbox can append these fields to Media widgets (after a module defines these as attachable), and I expose these fields as optional additions of the Media display, as insert module style tokens and the token system itself. So take what you want from that. I do not foresee myself using anything else in the next couple of months.
Comment #17
nitebreedPatch from #8 works great, also for images. Can this be included in the next release?
Comment #18
quicksketchI'm working on incorporating @weri's approach from #8 into a fully configurable module over in a sandbox at http://drupal.org/sandbox/quicksketch/1797528. It's not even usable yet, but I'm planning on fleshing it out over the next few weeks.
Comment #19
ParisLiakos commented#8: file_entity-embedded_file_entity_forms-1422632-8.patch queued for re-testing.
Comment #20
devin carlson commentedMarked #1669230: Allow files to be edited from the core file and image field widgets as a duplicate.
Comment #21
aaron commentedI am having difficulty determining where this patch applies to. I cannot find the form elements anywhere. I have looked under the default file widget, which is where I expect it to appear, but it does not actually appear there. Could someone please explain more what this patch does, or give a screenshot? Thanks.
Comment #22
gbonillo commentedI had to add this (field_attach_presave) to the code from post #3 to make it work with a taxonomy term reference (with an autocomplete widget) :
Comment #23
aaron commented#8: file_entity-embedded_file_entity_forms-1422632-8.patch queued for re-testing.
Comment #25
devin carlson commentedMarked #2128469: Editing File Fields in Content instead of File as a duplicate.
Comment #26
klokie commentedI was able to use File Entity Inline for this purpose.
Comment #27
honza pobořil commentedSo how about to close this issue?
Comment #28
hefox commentedThis seems like someone best closed by maintainer, as some may still rather incorporate it into their project. (hm, I don't remember why I was subscribed to this issue)
Comment #29
shevgeny#26 — the File Entity Inline module is dead, it works very poorly (no longer works, than works). Did anyone have any thoughts after 8 years? :)
Comment #30
shevgeny#6 & #8 — partially solve the problem, but I see an error if I choose not the usual file upload field, but a media browser:
Comment #31
joseph.olstadsee the issue queue for that module https://www.drupal.org/project/issues/file_entity_inline?categories=All
might help.
otherwise you could use a form alter and add the form or make a copy of this form and modify the copy.
see hook_form_alter