Tom Robert’s picture

This patch removes the entire filter wrapper when there are no permissions set for format, guidelines and help .

Tom Robert’s picture

Status: Active » Needs review
klattring’s picture

Status: Needs review » Fixed
mansspams’s picture

Status: Fixed » Reviewed & tested by the community

It will be fixed, once committed by maintainer. Ill set current status to RTBC since patch looks sane and fixes issue.

jenlampton’s picture

There is a fix mentioned here which may make this patch unnecessary: #934976: Provide method to hide input format fields without disabling WYSIWYG

jenlampton’s picture

Status: Reviewed & tested by the community » Needs review
640 bytes

I'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.

Babymaggie’s picture

Not 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

jenlampton’s picture

@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

cd MyDrupalSite/sites/all/modules/contrib/better_formats
patch -p1 < better_formats-remove_filter_wrapper-1706130-6.patch

if patch asks you which file to patch you can just tell it better_formats.module.

Then rm the patch file

rm better_formats-remove_filter_wrapper-1706130-6.patch

Hope that helps :)

Babymaggie’s picture

Thanks for the step by step guide jenlampton - This is going to be very useful information to me. Thank you :)

jenlampton’s picture

rerolled the patch from #6. Still needs a review :)

jenlampton’s picture

Issue summary: View changes

Patch here still applies cleanly to 7.x-1.0-beta2

Devin Carlson’s picture

Status: Needs review » Needs work

This 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.

Proteo’s picture

Unfortunately, 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:

if (!$show_selection && !$show_tips && !$show_tips_link) {
  $element['format']['#type'] = 'container';
  $element['format']['#access'] = FALSE;