I updated Better Formats to the last def and since then the wysiwyg editor isn't show anymore if the user doesn't have the permission 'Show format selection for nodes'.
I was just using this so that user wouldn't be able anymore to change the text format but still be able to edit using the set format.

Now i have to set the available text formats on the content type and give the user the permission.
So i have to set a permission so that user can select the format even if there is only one to select from otherwise they can't use that one format .... Seems a little weird to me.

Why not just stick to the managing the permissions to select a format and don't mingle in the permission to use a text format or not?

Members fund testing for the Drupal project. Drupal Association Learn more


dragonwize’s picture

Status: Active » Postponed (maintainer needs more info)

Everything there is for a reason. If you got the dev package this weekend you may have gotten it at some point in the middle so if you want to use the package I would wait until later today or tomorrow to get the latest code that all got committed to be put in the dev by the packager.

Beyond that there are several areas that you can configure yourself into a corner if you are not careful. I still need to redo the documentation for the new features and how they work.

To that end, I would need more info about your exact configuration to help out any more.

dazz’s picture

At the moment i have it set up like this:

the role editor can use 2 text formats: Filtered HTML an Full HTML
Depending on the field 1 of the 2 is used.
To do this I've set the default text format and disable the ability to choose a text format. So the users can only use the one I have set.

With the new version you have the ability to select what text formats are allowed to be used for a field and give permission to roles the select the text format.
The problem is that when a user doesn't have the permission to select the text format, not even the default text format is used.
This results in that the permission must be given to every user even if there is only one text format available.

If i wouldn't want a role to use a text format i would just not allow that text format access to that text format using the standard settings.

dragonwize’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Understood, however there are security implications with auto changing a format whether or not the user has access to it.

You can review the security team's review and help in building this feature out here: #1295248: Allow per-field-instance configuration of allowed formats

capellic’s picture

I ran into this problem, too, but I am happy with the implemented solution. I don't mind the extra clicks if it gives me flexibility down the line.

dazz said:

Now i have to set the available text formats on the content type and give the user the permission.

Actually, this isn't true. I kept "Show format selection for nodes" so that only user1 had these permissions. Apparently once you click on the "Limit allowed text formats" checkbox on the field settings form, Better Formats understand that you want to show the WYSIWYG editor. I notice that even if I choose more than one format that they should be able to use, but have given the field more than Text Format that is allowable, it will show the Text Format drop-down to the users who have permission to set it, but it will not show it to users who don't-- makes sense to me. So if there are multiple filter options for field, but a given user can't select which one to use, I can only assume that the Text Format being used is the first one.

This is the way it works beta1, too.

dkingofpa’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1
Status: Closed (works as designed) » Active
54.01 KB
48.32 KB
73.83 KB
57.98 KB

I was expecting the wysiwyg editor to be displayed even when I turn off the format selection permission. But apparently, the format selection permission also controls whether or not the wysiwyg editor is displayed on a field.

I don't understand the "auto changing a format" comment in #3. I don't want to change the format a visitor is using. I've already assigned a default text format I want them to use. I just want to not show the format selection field for certain roles. I suppose I could hide it with css, but that would be messy.

See attached images for more details.

alberto56’s picture

This seems to be a problem with the wysiwyg module, not the better_formats module: better_formats works as expected, in that users enter text in the expected text format whether or not they have the permission to access the text format selector widget. Perhaps wysiwyg module requires the widget to be present in order to load the wysiwyg editor?

What we really need to do is #934976: Provide method to hide input format fields without disabling WYSIWYG, no?

Cyclodex’s picture

I think there is the same problem also for the bueditor module, there I have the same problem.
Will investigate this later a bit more, and check for issue over there. Not sure if it is the implementation of these modules which is wrong or if the access setting from this module is the wrong approach, lets clear this...

For now, it seems that the toolbar is visible if I comment this line and so do not apply the access setting for single options as a format. (sure the format selection is now displayed which it should not)
better_formats.module Line 145

$element['format']['format']['#access'] = FALSE;
s.Daniel’s picture

Relevant wysiwyg issue: http://drupal.org/node/934976

agerson’s picture

Issue summary: View changes

I have the same issue

fonant’s picture

I have found that standard Better Formats, with WYSIWYG 7.x-2.2, plus the wysiwyg-one-format.934976.23-alt.patch patch from #934976-23: Provide method to hide input format fields without disabling WYSIWYG fixes this problem.

DamienMcKenna’s picture