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.
Strange blank border under the element with enabled better formats
Comment | File | Size | Author |
---|---|---|---|
#15 | better_formats-remove_filter_wrapper-1706130-15.patch | 433 bytes | jenlampton |
blank_border.png | 5.27 KB | klattring |
Comments
Comment #1
Tom Robert CreditAttribution: Tom Robert commentedThis patch removes the entire filter wrapper when there are no permissions set for format, guidelines and help .
Comment #2
Tom Robert CreditAttribution: Tom Robert commentedComment #3
klattring CreditAttribution: klattring commentedComment #4
mansspams CreditAttribution: mansspams commentedIt will be fixed, once committed by maintainer. Ill set current status to RTBC since patch looks sane and fixes issue.
Comment #5
jenlamptonThere is a fix mentioned here which may make this patch unnecessary: #934976: Provide method to hide input format fields without disabling WYSIWYG
Comment #6
jenlamptonI'm guessing at the fix mentioned from that other issue, but I believe this is the recommended change. Plus, it should also work with the change to WYSIWYG module. I have both patched versions of modules working together on my site.
Comment #7
Babymaggie CreditAttribution: Babymaggie commentedNot meaning to upset anyone, and it's probably my error, but after looking at the two patches on this page and trying them (by manually updating the better_formats.module file as I do'nt understand GIT) they both seem to break the wysiwig and prevent it from loading for the authenticated user.
I'm using 7.x-1.0-beta1 version.
Could someone please upload an already patched version for me to try?
Or should I try version 7.x-1.x-dev?
Best wishes
Comment #8
jenlampton@Babymaggie if you see a patch in the queue like this that is marked "needs review" then it will not be in the -dev version. Patches only make it into the -dev version once they are marked "fixed" and have been committed by the maintainer.
Are you familiar with the command line at all? You don't need to know GIT in order to apply a patch. You can download the patch file into the directory for the module that you are patching, and patch directly from there. here's what I do
if patch asks you which file to patch you can just tell it
better_formats.module
.Then rm the patch file
Hope that helps :)
Comment #9
Babymaggie CreditAttribution: Babymaggie commentedThanks for the step by step guide jenlampton - This is going to be very useful information to me. Thank you :)
Comment #10
jenlamptonrerolled the patch from #6. Still needs a review :)
Comment #11
jenlamptonPatch here still applies cleanly to 7.x-1.0-beta2
Comment #12
Devin Carlson CreditAttribution: Devin Carlson commentedThis was tried in #1699846: hidden input field for wysiwyg editor is removed under certain circumstances and was reverted as it caused problems with WYSIWYG.
Unsetting the format's #type or changing it to value would keep the data in the stored in the form array.
Comment #13
Proteo CreditAttribution: Proteo as a volunteer commentedUnfortunately, the patch from #10 makes the WYSIWYG editor dissapear, as commented by Devin. But tinkering around I found out that adding the line in the patch without removing the current one (#204) works fine. It removes the empty element and keeps the WYSIWYG editor working. I mean like this:
Comment #14
ugintl CreditAttribution: ugintl commentedHow to restrict text format on a custom form and then hide both text format selection and help text?
Comment #15
jenlamptonRerolled the patch from #10 based on feedback in #12 and #13. Marking NR for more reviews.
Comment #16
james.williams CreditAttribution: james.williams at ComputerMinds commentedFWIW ... the patch in #15 works for me, over 3 years later :-)
Comment #17
jenlamptonMarking as RTBC from comment #16 :)
Comment #18
AnybodyBe careful and look at related issues before merging this!
#2832330: Removing the format field breaks other modules
#3338558: HTML editor not loading since upgrade to 7.x-1.0-beta4
#2832330: Removing the format field breaks other modules
Back to needs review for that reason to be safe!
Comment #20
joseph.olstad