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.
Bug introduced with the API revamp. Currently this data is not required, but could be in further follow-ups.
The attached patch fixes it by saving to {filter}.module the module that provide the filter.
Comment | File | Size | Author |
---|---|---|---|
#15 | drupal.filter-format-crud.15.patch | 11.53 KB | sun |
#12 | drupal.filter-format-crud.12.patch | 10.87 KB | sun |
#10 | 562908.patch | 7.59 KB | blackdog |
#8 | drupal.filter-format-crud.patch | 8.61 KB | sun |
save-filter-module.patch | 1.31 KB | dropcube | |
Comments
Comment #1
dropcube CreditAttribution: dropcube commentedComment #3
lilou CreditAttribution: lilou commentedHEAD is broken.
Comment #4
sunAs with #562932: {filter_format}.cache is not saved, we want to add tests for Filter API CRUD functions, ensuring required data is properly created, loaded, updated, deleted.
Comment #5
sunIntroducing a new tag for feature freeze: API clean-up.
Comment #6
Dries CreditAttribution: Dries commentedThis looks like a valid patch, but it would be good to have tests, especially in this stage of the code freeze.
Comment #8
sunHere is a starting point - I've to leave now, so please go ahead.
Comment #10
blackdog CreditAttribution: blackdog commentedA try to re-roll this. The roles part of filter_format_save is no longer there, so I removed that.
Comment #12
sunNow including a full test suite for CRUD operations.
RTBC if bot passes.
Comment #13
dropcube CreditAttribution: dropcube commentedRTBC as far as I can see.
Comment #14
Dries CreditAttribution: Dries commented- After a ":", we really should start using a small letter instead of a capital letter. This is minor and I won't hold up the patch for it at this stage -- I will after slush.
- CRUD is not 100% accurate here, we're not testing 'Delete' (yet). Maybe we should add a small @todo? Maybe testTextFormatCRUD() should be renamed to testTextFormatLoadAndSave() or something?
Comment #15
sun1) Actually, I discussed exactly this issue with some texters/writers/grammar experts in IRC some time ago, because, you know, I'm nitpicky and eager to know the proper rules. ;)
What I learned about proper English grammar is that one starts with a lowercase letter after a colon when a sentence is continued before and after the colon. As in
One starts with a capital letter when the terms or phrases before and after the colon are "detached" and do not form a full sentence together, and the term/phrase after the colon forms a full sentence on its own. For example, as in
The latter also applies to the case of PHPDoc key definitions like this, and I specifically asked them about the proper capitalization by examining some examples in core. My understanding is that the above can be continued as pattern:
Interestingly, they mentioned that the same rule should also be applied to semicolons - e.g. like here:
2) Instead of renaming the test, we want to complete the CRUD by also testing text format deletion. :)
Comment #16
sun*bump*
Comment #17
sunThis issue blocks #562932: {filter_format}.cache is not saved, #573852: Rename {filter_format}.name to .title and replace .format with machine-readable .name, as well as some other issues in the queue.
Two options:
1) We proceed with the current approach, fixing all step by step.
2) We close down all issues and merge the patches into one new, larger FilterSystemRevamp patch.
Thus far, 1) has also been easier for me to follow and validate all changes we apply. However, I can see the (perfectly possible) point that these issues may feel like a never-ending swarm of patches, where every single one takes a certain amount of time to review. Either one is fine with me (though I definitely prefer the former).
Comment #18
webchickWhile not strictly on-topic, as a native English speaker with grammar nerd tendencies, I can confirm the format of the colon / capital separation that's currently in the patch feels "right" to me.
Tests look great, and I'm cool with committing this. But why are you removing over-arching documentation about the filter system?
Comment #19
sunYay! webchick is back! :)
The doxygen "group" is a left-over from times when filter_xss() and related functions were in filter.module. Those have been moved to common.inc, so the "group" basically wraps around check_markup() now. In addition it was using the @name directive, which is not even parsed on api.d.o. :)
Comment #20
sunPlease?
Comment #21
sunDo not touch this tag.
Comment #22
webchickOK cool. Committed to HEAD!
Comment #25
gisleRemoved non-canonical tag. See #2426171: Multiple tags similar to 'API clean-up' for background.