Hi,
I have 2 TinyMCE profiles, one 'admin' and the other 'autenticated user'. In the rich text editor of the authenticated user there are much less buttons then in the admin's profile. As I am user 1 I have checked the admin role in my user profile and so I was expecting to get the full score of buttons, but instead I get those selected for an authenticated user. Is this a bug? Do I do something wrong?
Please help.

Theo Richel

Comments

husztisanyi’s picture

Title: Cannot assign profiles to roles » I still cannot assign profiles to roles

I have the same problem.
Could anyone help us?

stevenpatz’s picture

Title: I still cannot assign profiles to roles » Cannot assign profiles to roles
EmpireNM’s picture

I think the problem you are having is that the TinyMCE module assigns you the lowest profile you have. There was a discussion of that issue here. Hope that helps.

http://drupal.org/node/132198

husztisanyi’s picture

Thank You, but unfortunately none of theese helps:
http://drupal.org/node/132198
http://drupal.org/node/60667
http://drupal.org/node/66014
http://drupal.org/node/132198

In the Tinymce settings, the alphabetical order of profile names is the role weight!

So, if You have three profile name: AAA, BBB, CCC - than, it will works, :
AAA - admin
BBB - authenticated user
CCC - anonymous user

... and won't work:
AAA - anonymous user
BBB - authenticated user
CCC - admin

theorichel’s picture

Hihaaa! Huszitany for president!!!

Thanks very much for solving this mystery

theorichel’s picture

sgdev’s picture

I had a duplicate of the issue posted here: http://drupal.org/node/250347

Wow, I can't believe the order of the TinyMCE profiles caused the problem. The dependency of those should really be removed by either applying the profiles as they are assigned, or including a weight on the main TinyMCE admin page as to which profile gets applied first.

mjourney2’s picture

I don't believe it has to do with the name... Rather, it's the order in which the TinyMCE profiles were created.

Line 108 of the tinymce.module file says:

$profile_name = db_result(db_query('SELECT s.name FROM {tinymce_settings} s INNER JOIN {tinymce_role} r ON r.name = s.name WHERE r.rid IN (%s)', implode(',', array_keys($user->roles))));

db_query returns all the results that match a user's profile (e.g. authenticated user and administrator). But it returns those results in the order in which they were entered into the table. db_result then picks the first one.

So the first TinyMCE profile you create should be that for the highest permission user. Any subsequent TinyMCE profiles you build should have fewer privileges.

sgdev’s picture

I'm not so sure about this. I created them in the order of highest permission user to lowest, and it did not work. It was not until I modified the names to start with "A - ", "B - ", "C - ", etc. that the problem was then fixed.

kikko’s picture

Thanks Huszitany, you find the problem for mee too. (drupal 6.3 - tinymce version 6.x-1.1-dev)
@ mjourney2 - I have try to solve the problem making as you propone, but the problem still remain. Thank, anyway.

nicoloye’s picture

Issue summary: View changes
Status: Active » Closed (outdated)