I believe the summaries are missing from vertical tabs on the edit content type admin page (e.g. /admin/structure/types/manage/article).
It appears that we are never attaching content_types.js at all. I have included a patch that simply adds 3 lines of code to content_types.inc:
+ '#attached' => array(
+ 'js' => array(drupal_get_path('module', 'node') . '/content_types.js'),
+ ),
I've attached screenshots showing the current page in HEAD and the patched version that has the summaries.
This is in Drupal 7 HEAD as of 11/11/2009. I couldn't find any other relevant issue addressing this. I don't know this code terribly well so please advise if I'm way off.
Comments
Comment #1
bowersox commentedLooks like this issue added the functionality originally: #439798: Vertical Tabs for the Node Type Form.
Back then it included this code...
...at the very top of node_type_form() which is probably a more appropriate place.
Comment #2
robloachHaha, not sure where content_types.js went to.
Comment #3
seutje commentedyea I noticed that the content types didn't have a summary, but I didn't notice there was a js file just sitting there :x
Comment #4
seutje commentedoops, didn't mean to crosspost
Comment #5
bowersox commentedShould the
#attachedvalue actually appear in each relevant section of the form?For example, in modules/node/node.pages.inc we attach node.js in each section of the form:
Comment #6
seutje commentedhmm that would make sense, because if someone form_alters out that piece the js shouldn't still get added
Comment #7
webchickSounds like this still needs work?
Comment #8
bowersox commentedCheck this one out. This patch attaches content_types.js in each relevant section of the form: submission, workflow, and display. Those 3 sections of the form get vertical tab summaries from content_types.js.
Comment #9
bowersox commentedOn IRC @RobLoach was saying maybe we don't need this in 3 places and we should go back to 1 attach. He also suggested we could get rid of the redundant attach statements for node.js in modules/node/node.pages.inc.
I was away from IRC for a bit and missed the chance to follow up to ask what about the situation @seutje described of someone form_alter'ing one section out but still needing the JS.
Either way, we should fix this and restore the functionality.
Comment #10
dave reidIt's more than reasonable that somehow we could alter one of the fieldsets to #access = FALSE. So it should be attached to any fieldset that it could be. Or just attached to the form itself.
Comment #11
dave reidAdding tag
Comment #12
dave reidThis is the best solution.
Comment #13
bowersox commentedThis is a bug fix that's been sitting at RTBC for quite a while. Is there anything I can do to help this get through the process?
Comment #14
robloachHmm, seems like an appropriate place for it would be on the vertical tab element itself. The JavaScript provides the summaries for the additional settings vertical tabs, so that's probably the most appropriate place it could be, without having to duplicate code in three different places.
Comment #15
bowersox commentedThe patch works correctly and restores the vertical tab summaries when editing content types (eg /admin/structure/types/manage/article). Looks ready for RTBC to me.
Comment #16
casey commentedVery much indeed
Comment #17
casey commented#14: 630486.patch queued for re-testing.
Comment #18
sunAgreed.
Comment #19
dries commentedCommitted to CVS HEAD.