Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
block.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2013 at 20:31 UTC
Updated:
29 Jul 2014 at 22:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
olli commentedComment #2
larowlanThanks
Should we expand tests here?
Comment #3
benjy commentedTagging, I think tests would be good here.
Comment #4
lauriiiSo we need to create a test for this
Comment #5
lauriiiHere's a test for this.
Comment #6
swentel commentedThe test will most likely fail because of #2099417: Unable to change Custom Block view mode - I'm wondering though if it makes sense at all to expose 'Default'. We don't allow this anywhere else with view modes.
Space at the end which should go.
Comment #7
lauriiiWe should run the tests with the patch swentel have applied to #2099417: Unable to change Custom Block view mode
Comment #9
dave reid@swentel: See the issue summary. The default view mode is exposed in entity reference and in Views. It was wrong of us *not* to expose it since it's exposed in the Field UI.
Comment #10
lauriiiHere's a patch#5 and swentel's patch in #2099417: Unable to change Custom Block view mode together.
Comment #12
olli commentedNice work!
Is there a reason why this has to go inside the if?
We should click the "Configure" link instead.
Comment #13
marthinal commentedPatch attached with a possible test that works here #2099417: Unable to change Custom Block view mode
Comment #13.0
marthinal commentedUpdated issue summary.
Comment #14
olli commentedThe other issue went in. Here's a small test for available view mode options.
Comment #16
olli commentedComment #17
larowlanReady to fly
Comment #18
webchickCommitted and pushed to 8.x, although I'm concerned given how many other modules have had this problem given the xrefs in the issue summary that this may be the wrong way to fix it. Can default be added after the fact somewhere in field UI if it doesn't already exist? (e.g. $options += array('default' => 'Default')?)
Comment #19
webchick...let's try that again, drupal.org.
Comment #20
dave reidIt's not a matter of adding it in the Field UI. It's a matter of all these little places that expose the view modes in some kind of selection. It would be nice if we had some kind of helper function to retrieve a list of view modes for a select box array, that automatically added the 'default' one (and possibly didn't allow view modes that haven't been 'configured' yet to be selected). I'll file an issue for that.