User login

So if you think there's a crazy bug in permission to access text formats...

...it's probably because there is already content in the text area that is set to something to which the user no longer has access.

It seems really freaky when you have access to one text format, and it says:

"This field has been disabled because you do not have sufficient permissions to edit."

So you add another text format, and now you have access to the field... and the format it must have been saying you didn't have permissions for before, what???

What's actually happening is that there's content in the text field which is using a text format that the user had access to at one point but not anymore, or an administrator edited and set to a text format to which the user no longer has access.

Giving the user's role the ability to use that currently restricted text format (this is done in the text format settings, not in permissions, incidentally) now allows them to edit the field-- and change it to the text format they had access to all along. That's why giving a text format a friend magically gives the user access to two.

This can happen most confusingly on user edit forms. Say you have "Limited markup" allowed for only anonymous users, and "A bit more markup" allowed only for authenticated users (because you don't want unnecessary options of text formats to show to anyone). If a long text field is configured to show on the user registration/signup page, and someone fills in some text that necessarily has the "Limited markup" text format, as soon as they submit the form and become a user, when they go to edit the very same information as an authenticated user, they will get the "disabled because you do not have sufficient permissions" error message on that field, because they only have access to "A bit more markup" text format.

Headdesk.

Searched words: 
drupal 8 text format permission bug textfield input filter perms

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.