Problem/Motivation
The relationship between filters and formats is unclear and would be helped by linking to the relevant administrative page.
Proposed resolution
Clearly document the relationship between filters and formats and improve usability by linking to the relevant administrative page from the permissions screen.
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Reroll the patch if it no longer applies. | Instructions | ||
Manually test the patch | Novice | Instructions |
Steps to reproduce the issue
- Visit the permissions screen
- See that the description is missing for the "administer filters" item
Original report by @amontero
To hopefully document the relationship between filters and formats and also improving usability a bit by linking to the relevant administrative page.
Comment | File | Size | Author |
---|---|---|---|
#55 | interdiff-55.txt | 1.68 KB | joshi.rohit100 |
#55 | 1684930-55.patch | 578 bytes | joshi.rohit100 |
#53 | 1684930-53.patch | 1.62 KB | rpayanm |
Comments
Comment #1
jthorson CreditAttribution: jthorson commentedTagging 'novice' for review and manual testing.
Comment #2
trogels CreditAttribution: trogels commentedThe patch applies, follows the coding standards and implements the t() function as it's supposed to
Comment #3
yoroy CreditAttribution: yoroy commentedThe link is a good idea. Lets try to write this in a way that doesn't almost literally repeat the label. Something like this maybe:
Define how text is handled by combining filters into [link]text formats[/link]
Comment #4
amonteroMe too likes it better that way. Rerolling.
Looks good in my system, please review.
Comment #5
botrisTested and confirming it works
Comment #6
yoroy CreditAttribution: yoroy commentedNice, thanks all.
Comment #7
amonteroI would be thankful if someone may help with similar issue: #1365234: Add description to "access content overview" permission.
We're stuck with the help text phrase there. @yoroy: your usability skills can be very helpful at ths point, since you nailed it here.
TIA.
Comment #8
webchickCommitted and pushed to 8.x. Thanks!
Comment #9
amonteroReroll against 7.x
Comment #10
jthorson CreditAttribution: jthorson commentedApplies and does what it says. RTBC.
Comment #11
jthorson CreditAttribution: jthorson commentedOn second thought, let's make it read the same as D8 ...
Comment #12
jthorson CreditAttribution: jthorson commentedComment #13
amonteroOps. Thanks, jthorson. I rerolled the wrong patch :S
Patch applies and works as expected.
Comment #14
jthorson CreditAttribution: jthorson commentedNote to committer: Commit credit goes to Amontero (& possibly Yoroy for the wording suggestions).
Comment #16
amontero@jthorson: I do not agree. I don't know about core maintainers practices, but IMO correcting that mistake is obviously worth crediting, too ;)
As a side note, that brought back to my mind an awesome Drupal Dev Days Barcelona 2012 speech by @webchick that I could not find recorded. I mean the part about "issue queue process in cartoon form". Definitely, one of the funniest sessions I've attended.
Comment #17
David_Rothstein CreditAttribution: David_Rothstein commentedI don't mean to nitpick, but if we're going to add a new string to Drupal 7 I only want to do it once and not change it later, so here's the nitpick...
I also find this issue ironic given the history in #620446: Rewrite permission titles and descriptions - there used to be a description here before, but it was unceremoniously removed before Drupal 7 was released. One step forward, one step back, one step forward again, or something like that :)
In any case, this certainly makes sense to me, and it should be fine to add to Drupal 7. Per http://drupal.org/node/1527558 we should ideally do it early in a release cycle, but we're still probably far enough from the next Drupal 7 point release that it's OK to do now if we do it soon.
Comment #18
cachee CreditAttribution: cachee commentedThe following test steps were performed:
1. access the permission page via admin/people/permissions#module-filter
2. Viewed the message to be updated.
Message before patch
3. Applied the patch
4. Viewed the message after the update.
Message after patch
5. Message is now the same as in D8
6. Patch worked as expected
Comment #19
cachee CreditAttribution: cachee commentedComment #20
David_Rothstein CreditAttribution: David_Rothstein commentedI still want to have a discussion about #17 before committing this to Drupal 7.... (Because I don't want to introduce a new string and then have to change it again later, breaking translations in the process.)
I'm aiming to get a core bug fix release out during the next release window (November 7), in which case at this point it's probably too late to commit new translatable strings intended for that release... However, we can definitely aim to get it committed right after that (so it goes into the following release).
Comment #21
David_Rothstein CreditAttribution: David_Rothstein commentedAnd I guess if we are going to discuss possible changes to this, it should be against Drupal 8 for starters.
Comment #22
amonteroAddressing David's comments in #17:
Not needed IMO, it's verbose enough. Unless UX people says it is not :)
Patch fixes it.
Comment #23
dawehnerAre you actually sure that you
It feels wrong to check access in an info hook,
as this maybe could cause issues in the future.
Comment #24
amonteroAFAIK, there is no problem here. I'm doing the access check the same than it's done a few lines below in the same function.
Comment #25
dawehnerYeah sure, it does totally work because user_access never calls hook_permission but I just said it feels wrong,
as this for example would block hook_permission to be cached.
Other places in which there are links in permissions:
Comment #26
Wim LeersTotally agreed with #25. Please reroll without the access check.
Comment #27
yoroy CreditAttribution: yoroy commentedAs for the first question in #17, I don't think we need to add the part about assigning text formats to roles. The usability gain is in facilitating that discovery by providing a link to the relevant configuration page, we don't have to explain that up front.
Comment #28
davidsheart02 CreditAttribution: davidsheart02 commentedComment #29
dandaman CreditAttribution: dandaman commentedI tried applying the #22 patch and then removing the access check. But then it's functionally the same as current Drupal 8.x-dev, is it not?
The rerolled version would be:
While the module's current code is:
It's definitely possible that I am misunderstanding what is desired to be done here.
Comment #30
David_Rothstein CreditAttribution: David_Rothstein commentedIf we're not changing the text then I think it's OK to put this back to Drupal 7. But the discussion of doing the permission checks should be split to a different issue (it's now inconsistent in multiple ways in Drupal 8).
For Drupal 7 we should definitely do the user_access() check to be consistent with the rest of the function, especially since we don't have the luxury of continually breaking these translations whenever we change our mind :)
This is wrong though - we can't concatenate strings with variables like that or it won't be properly translatable. We should probably just have two different strings (one with the link and one without).
Comment #31
jackbravo CreditAttribution: jackbravo commentedOk. I created #2283717 to address the inconsistency in using user_access in hook_permission functions.
Moving this issue then to the backport to Drupal 7. There were already some patches for drupal 7 in the queue, maybe they still apply.
Comment #32
jackbravo CreditAttribution: jackbravo commented12: drupal--1684930-12-add-description-to-administer-text-formats-permission.D7.patch queued for re-testing.
Comment #33
dcam CreditAttribution: dcam commentedI'm not sure why the issue is stuck at Needs Work when #12 passed its last retest.
It's a minor change which is nearly identical to what went into D8. It looks good to me. The new text is appearing on the permissions page. It's RTBC from me.
Comment #35
dcam CreditAttribution: dcam commentedI'm re-uploading #12. I am not the author and this should not be attributed to me. The issue won't stay RTBC because #22 gets re-tested when the status is set.
Comment #37
dcam CreditAttribution: dcam commented35: drupal--1684930-35-add-description-to-administer-text-formats-permission.D7.patch queued for re-testing.
Comment #38
dcam CreditAttribution: dcam commentedUnrelated test failure. Still RTBC.
Comment #39
yoroy CreditAttribution: yoroy commentedAnd still a worthy little text tweak. RTBC indeed.
Comment #42
dcam CreditAttribution: dcam commented...More random test failures.
Comment #45
jackbravo CreditAttribution: jackbravo commentedThis was already RTBC
Comment #46
David_Rothstein CreditAttribution: David_Rothstein commentedThis is still inconsistent with the user_access() check used elsewhere in the same function - see discussion above.
Comment #47
David_Rothstein CreditAttribution: David_Rothstein commentedIn other words, something like this?
Comment #48
David_Rothstein CreditAttribution: David_Rothstein commentedWith slightly better code style this time...
Comment #49
jackbravo CreditAttribution: jackbravo commentedBut didn't we just removed those checks in Drupal 8?
Should we removed them also from Drupal 7? Open another issue for that? Or just stick with what's already there?
Comment #50
David_Rothstein CreditAttribution: David_Rothstein commentedBackporting #2283717: Remove user_access function calls on hook_permission functions to Drupal 7 is definitely a possibility (I will change the status of that issue).
That issue came to a resolution a fair amount faster than I thought it would, so doing one thing here and another thing there does seem a little backwards/conflicting now... however, there's still a good chance there will be a Drupal 7 point release in between the two, so I think we should keep the Filter module permissions self-consistent in the meantime (hence my patch). If the other issue winds up getting in also, it will have to undo a bit of what we do here, but not that big of a deal; better that we always have the code in a state that behaves consistently whenever we release it.
Comment #51
amonteroPostponing until closure of above mentioned issue, hopefully soon, since it's reviewed OK.
Comment #52
David_Rothstein CreditAttribution: David_Rothstein commentedI just committed #2283717: Remove user_access function calls on hook_permission functions, so I guess that means this one goes back to... "Needs work"?
Comment #53
rpayanmPlease review.
Comment #54
jackbravo CreditAttribution: jackbravo commentedHi rpayanm
As discussed in #2283717: Remove user_access function calls on hook_permission functions, we shouldn't use user_access on hook_permission, so, to be consistent, you should remove that check from the patch and just link to the admin page.
Comment #55
joshi.rohit100Updated as per #54
Comment #56
jackbravo CreditAttribution: jackbravo commentedSeems good =).
Comment #57
David_Rothstein CreditAttribution: David_Rothstein commentedCommitted to 7.x - thanks!