Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Task
Convert the following theme functions to use the new table #type:
Module | Theme function name | Where in Code | What is it really? |
---|---|---|---|
user | theme_user_admin_permissions | function | form table |
|
|
|
|
Related issues
Comment | File | Size | Author |
---|---|---|---|
#17 | 1938938-15-user-tables.patch | 5.8 KB | Risse |
#15 | 1938938-15-user-tables.patch | 5.97 KB | Risse |
#6 | 1938938-6-user-tables.patch | 5.76 KB | duellj |
#1 | 1938938-1-user-tables.patch | 4.39 KB | duellj |
Comments
Comment #1
duellj CreditAttribution: duellj commentedFirst pass at converting theme_user_admin_roles to table #type. Currently there doesn't seem to be a way to add attributes to table #type columns, so theme_user_admin_permissions can't be converted until that's fixed.
Comment #2
duellj CreditAttribution: duellj commentedWaiting on this issue to allow table cell attributes: #1948374: #type 'table' allow attributes on table cells
Comment #3
andypostThis issue could be marked as duplicate of #1872870: Implement a RoleListController and RoleFormController
Roles will get this controllers anyway
Comment #4
duellj CreditAttribution: duellj commentedThanks anypost, removed theme_user_admin_roles() from the list of conversions. theme_user_admin_permissions() will still need to be converted.
Comment #5
andypostRelated issue #229193: Incremental filter for permissions page
Comment #6
duellj CreditAttribution: duellj commentedAttached patch converts theme_user_admin_permissions to table #type. There's no interdiff, since it's unrelated to the patch from #1 (which converts the roles table). Also updating title to reflect new scope.
Comment #7
andypostPatch looks ready, needs manual testing for attributes
Is there a way to meka it consistent?
'#attributes' => array('id'=>...)
Comment #8
jibranTagging.
Comment #9
neochief CreditAttribution: neochief commentedIsn't the #markup stuff should be filtered with at least filter_xss_admin() ? I've tried to create a module with
tag in name and the script was launched on the page with permissions. I know that it's an edge case (if there's an edge for edge cases, that should probably be it), but that's a XSS anyway.Comment #10
andypostHey, this one should be postponed for #1872876: Turn role permission assignments into configuration.
Also should be build on top of FormInterface and provided as route #1971384: [META] Convert page callbacks to controllers
Comment #11
andypost$module should be safe
Better make it a render array.
#theme => #user_permission_description
Role name could be entered within UI so check_plain() needed here because seems checkbox render does not filters it's title
Comment #12
andypostseems role name was not filtered before
Comment #13
jibran#6: 1938938-6-user-tables.patch queued for re-testing.
Comment #15
Risse CreditAttribution: Risse commentedUpdated duelljs' patch on message #6, should apply correctly.
Comment #17
Risse CreditAttribution: Risse commentedThe previous patch had some bad line endings, this one applies ok.
Comment #18
Brandonian CreditAttribution: Brandonian commentedPatch looks good to me. User permissions page renders properly, still functional. Marking as reviewed and tested.
Comment #19
alexpottCommitted c874593 and pushed to 8.x. Thanks!
Comment #20.0
(not verified) CreditAttribution: commentedRemoving theme_user_admin_roles