Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jun 2013 at 07:53 UTC
Updated:
3 Dec 2015 at 17:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
joelpittetWondering if 'widget' should be in the name, because 'file_widget' extends from #type 'managed_file'
Comment #2
thedavidmeister commentedWhat about 'managed_file' for the #type/#theme and 'managed_file_widget' for the widget extending the base #type?
Comment #3
joelpittetThat makes sense to me! I wonder if we can still get this kind of change in for D8 beta?
Comment #4
slashrsm commentedNot sure if this is related or not...
I was looking into this while trying to solve another issue and realized that
file_widgettheme isn't even used any more. It seems thatfile_managed_filegets picked every time instead of it.As part of #2511036: image-widget.html.twig never gets used (image_widget gets overridden by FieldWidget::process) this hunk went in:
Intent of this hunk was to prevent file widget from overriding theme that image widget sets. Since file managed element sets theme to
file_managed_filethis condition always stays unsatisfied andfile_widgettheme unused as a result of that.I am wondering if we need
file_widgetat all?Comment #5
star-szr@slashrsm we probably don't need it in core but I'm thinking the fact that it's there and it's RC means we can't remove it.
Comment #6
slashrsm commented@Cottser: I had the same thought too. This probably means D9 material?
Comment #7
slashrsm commentedComment #8
catchThis is very confusing and I think we should consider it as borderline 'dead code removal' for an RC target.
If a module is relying on this, I'd be very surprised.
If not, we should at least deprecate it somehow.
Comment #9
joelpittetRemoved, let's see what happens:)
Comment #10
andypostLooks great, except following
how this change related?
Comment #11
star-szrYeah I think there's some definitely some unrelated changes in there.
Comment #12
joelpittetWhoops, thanks for the review. Well all works;)
Comment #13
star-szrLooks good my only thought is there's maybe some code that would be dead in core/modules/file/file.js as a result:
Found that grepping for file_widget and file-widget.
Comment #14
slashrsm commentedThat JS is not dead. It is still used by file/image widget. Standard install, node/add/article, upload an image in image field, image link that appears is handeled by that code.
In JS console on the same page:
Comment #15
star-szrI'm not saying all those lines of JS are dead but the
.file-widget .file aselector sure seems like it would be :)Comment #16
joelpittetI agree, not changing status because I believe that is all the things.
Comment #17
effulgentsia commentedI discussed this with @xjm to triage, but @catch wasn't online. Assigning to him, so that we figure it out when he is.
Comment #18
effulgentsia commentedAh, comment #4 explains why/how
file-widget.html.twigis currently dead code. Yeah, this is better to clear up pre-release than have to support until 9.x.Comment #19
catchCommitted/pushed to 8.0.x, thanks!
Comment #21
nod_