D6.12, CKEditor module 6.x-1.1, CKeditor 3.2, HTML Purifier 6.x-2.1, Better Formats 6.x-1.2

I have 3 CK Profiles:
Default - using Filtered HTML with DrupalBasic toolbar
Advanced - using "Extra HTML" (HTML Purifier filter) with DrupalFiltered toolbar
Full (added profile) - using Full HTML with DrupalFull toolbar

2 extra roles "admin" & "webmaster"- w/ 'access ckeditor' perm inherited as 'Auth user' has perm.

My "Full" CK Profile has "Roles allowed" granted to "admin" & "webmaster" - and visibility 'includes' of:
node/add/*.edit-body
node/*/edit.edit-body
*@node/*/edit.edit-body
*@node/add/*.edit-body

Better Formats "defaults" for "admin" & "webmaster" are set to "Full HTML".

The problem: Only "admin" & "webmaster" roles get the DrupalFull toolbar @:
node/add/ANY.edit-body - or - node/ANY/edit.edit-body
while user1 only gets the DrupalBasic toolbar!

Been laboring over this for way too many hours, can't figure what's wrong - I need to have user1 access to a FULL toolbar not only at the above critical textareas but elsewhere as well!

Any thoughts?

CommentFileSizeAuthor
#5 ckeditor_settings.sql_.txt7.75 KBrhimes
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rhimes’s picture

Title: Can't get full toolbar to show for user 1 » Full toolbar does not show for user 1

just changing title - any help would be greatly appreciated - what in the world am I missing?

mephir’s picture

Status: Postponed (maintainer needs more info) » Active

Which profile have you got connected with Authenticated Users ? Or other role which have user no 1 ? I need more info about roles and configuration of ckeditor module. Can you export ckeditor_settings and ckeditor_role tables ?

mephir’s picture

Status: Active » Postponed (maintainer needs more info)
rhimes’s picture

Status: Active » Postponed (maintainer needs more info)

"Which profile have you got connected with Authenticated Users ?"
Default (renamed "Basic") profile only has Authenticated User as it's "Roles allowed" - none other

"Or other role which have user no 1 ?"
User #1 , I had assumed, got permission to all profiles - there are no options under "Roles allowed" for the "super user" for any of the profiles.

Exports: I renamed "Default" to "Basic" & "Advanced" to "Extra"
--
-- Dumping data for table `ckeditor_settings`
--

INSERT INTO `ckeditor_settings` (`name`, `settings`) VALUES
('Extra', 'a:41:{s:15:"allow_user_conf";s:1:"f";s:7:"filters";a:14:{s:11:"lightbox2/6";i:1;s:6:"gmap/0";i:1;s:14:"htmlpurifier/0";i:1;s:14:"htmlpurifier/1";i:0;s:8:"filter/3";i:0;s:8:"filter/0";i:0;s:21:"image_resize_filter/0";i:1;s:11:"lightbox2/1";i:0;s:11:"lightbox2/0";i:0;s:11:"lightbox2/3";i:0;s:11:"lightbox2/5";i:0;s:11:"lightbox2/2";i:0;s:11:"lightbox2/4";i:0;s:10:"swftools/0";i:0;}s:2:"ss";s:1:"2";s:8:"min_rows";s:1:"2";s:9:"excl_mode";s:1:"0";s:4:"excl";s:0:"";s:11:"simple_incl";s:0:"";s:7:"default";s:1:"t";s:11:"show_toggle";s:1:"t";s:5:"popup";s:1:"f";s:4:"skin";s:4:"kama";s:7:"uicolor";s:7:"default";s:16:"uicolor_textarea";s:95:"\r\nClick on the UI Color Picker button to set your color preferences.

\r\n";s:12:"uicolor_user";s:7:"default";s:7:"toolbar";s:14:"DrupalFiltered";s:6:"expand";s:1:"t";s:5:"width";s:4:"100%";s:4:"lang";s:2:"en";s:9:"auto_lang";s:1:"t";s:18:"language_direction";s:7:"default";s:10:"enter_mode";s:1:"p";s:16:"shift_enter_mode";s:2:"br";s:11:"font_format";s:35:"p;div;pre;address;h1;h2;h3;h4;h5;h6";s:17:"custom_formatting";s:1:"f";s:10:"formatting";a:1:{s:25:"custom_formatting_options";a:6:{s:6:"indent";s:6:"indent";s:15:"breakBeforeOpen";s:15:"breakBeforeOpen";s:14:"breakAfterOpen";s:14:"breakAfterOpen";s:15:"breakAfterClose";s:15:"breakAfterClose";s:16:"breakBeforeClose";i:0;s:10:"pre_indent";i:0;}}s:8:"css_mode";s:5:"theme";s:8:"css_path";s:0:"";s:9:"css_style";s:5:"theme";s:11:"styles_path";s:0:"";s:11:"filebrowser";s:4:"none";s:17:"filebrowser_image";s:4:"imce";s:17:"filebrowser_flash";s:4:"imce";s:13:"UserFilesPath";s:5:"%b%f/";s:21:"UserFilesAbsolutePath";s:7:"%d%b%f/";s:20:"ckeditor_load_method";s:11:"ckeditor.js";s:22:"ckeditor_load_time_out";s:1:"0";s:21:"forcePasteAsPlainText";s:1:"t";s:15:"theme_config_js";s:1:"f";s:7:"js_conf";s:0:"";s:10:"excl_regex";s:0:"";s:17:"simple_incl_regex";s:0:"";}'),
('Basic', 'a:41:{s:15:"allow_user_conf";s:1:"f";s:7:"filters";a:14:{s:11:"lightbox2/6";i:1;s:6:"gmap/0";i:0;s:14:"htmlpurifier/0";i:0;s:14:"htmlpurifier/1";i:0;s:8:"filter/3";i:0;s:8:"filter/0";i:1;s:21:"image_resize_filter/0";i:0;s:11:"lightbox2/1";i:0;s:11:"lightbox2/0";i:0;s:11:"lightbox2/3";i:0;s:11:"lightbox2/5";i:0;s:11:"lightbox2/2";i:0;s:11:"lightbox2/4";i:0;s:10:"swftools/0";i:0;}s:2:"ss";s:1:"2";s:8:"min_rows";s:1:"1";s:9:"excl_mode";s:1:"0";s:4:"excl";s:0:"";s:11:"simple_incl";s:0:"";s:7:"default";s:1:"t";s:11:"show_toggle";s:1:"t";s:5:"popup";s:1:"f";s:4:"skin";s:4:"kama";s:7:"uicolor";s:7:"default";s:16:"uicolor_textarea";s:95:"

\r\n Click on the UI Color Picker button to set your color preferences.

\r\n";s:12:"uicolor_user";s:7:"default";s:7:"toolbar";s:11:"DrupalBasic";s:6:"expand";s:1:"t";s:5:"width";s:4:"100%";s:4:"lang";s:2:"en";s:9:"auto_lang";s:1:"t";s:18:"language_direction";s:7:"default";s:10:"enter_mode";s:1:"p";s:16:"shift_enter_mode";s:2:"br";s:11:"font_format";s:35:"p;div;pre;address;h1;h2;h3;h4;h5;h6";s:17:"custom_formatting";s:1:"f";s:10:"formatting";a:1:{s:25:"custom_formatting_options";a:6:{s:6:"indent";s:6:"indent";s:15:"breakBeforeOpen";s:15:"breakBeforeOpen";s:14:"breakAfterOpen";s:14:"breakAfterOpen";s:15:"breakAfterClose";s:15:"breakAfterClose";s:16:"breakBeforeClose";i:0;s:10:"pre_indent";i:0;}}s:8:"css_mode";s:5:"theme";s:8:"css_path";s:0:"";s:9:"css_style";s:5:"theme";s:11:"styles_path";s:0:"";s:11:"filebrowser";s:4:"imce";s:17:"filebrowser_image";s:4:"imce";s:17:"filebrowser_flash";s:4:"imce";s:13:"UserFilesPath";s:12:"%b%f/uploads";s:21:"UserFilesAbsolutePath";s:14:"%d%b%f/uploads";s:20:"ckeditor_load_method";s:11:"ckeditor.js";s:22:"ckeditor_load_time_out";s:1:"0";s:21:"forcePasteAsPlainText";s:1:"f";s:15:"theme_config_js";s:1:"f";s:7:"js_conf";s:0:"";s:10:"excl_regex";s:0:"";s:17:"simple_incl_regex";s:0:"";}'),
('CKEditor Global Profile', 'a:9:{s:4:"rank";a:9:{i:0;s:1:"3";i:1;s:2:"15";i:2;s:1:"9";i:3;s:1:"8";i:4;s:1:"7";i:5;s:1:"6";i:6;s:1:"5";i:7;s:1:"4";i:8;s:1:"2";}s:9:"excl_mode";s:1:"0";s:4:"excl";s:217:"admin/content/node-type/*.edit-ant-pattern\r\nadmin/content/node-type/*.edit-description\r\n*@node/*/signups/*\r\nadmin/build/block/configure/*\r\nadmin/settings/signup.*\r\nguestbook.edit-message\r\nadmin/user/userpoints/add/*\r\n";s:11:"simple_incl";s:0:"";s:13:"ckeditor_path";s:11:"%m/ckeditor";s:19:"ckeditor_local_path";s:0:"";s:18:"show_fieldnamehint";s:1:"t";s:10:"excl_regex";s:295:"#(?:^.*@admin/content/node-type/.*\\.edit-ant-pattern$)|(?:^.*@admin/content/node-type/.*\\.edit-description$)|(?:^.*@node/.*/signups/.*\\..*$)|(?:^.*@admin/build/block/configure/.*\\..*$)|(?:^.*@admin/settings/signup\\..*$)|(?:^.*@guestbook\\.edit-message$)|(?:^.*@admin/user/userpoints/add/.*\\..*$)#";s:17:"simple_incl_regex";s:0:"";}'),
('Full', 'a:41:{s:15:"allow_user_conf";s:1:"f";s:7:"filters";a:14:{s:11:"lightbox2/6";i:1;s:6:"gmap/0";i:1;s:14:"htmlpurifier/0";i:0;s:14:"htmlpurifier/1";i:0;s:8:"filter/3";i:0;s:8:"filter/0";i:0;s:21:"image_resize_filter/0";i:1;s:11:"lightbox2/1";i:0;s:11:"lightbox2/0";i:0;s:11:"lightbox2/3";i:0;s:11:"lightbox2/5";i:0;s:11:"lightbox2/2";i:0;s:11:"lightbox2/4";i:0;s:10:"swftools/0";i:0;}s:2:"ss";s:1:"2";s:8:"min_rows";s:1:"2";s:9:"excl_mode";s:1:"1";s:4:"excl";s:166:"node/add/*.edit-body\r\nnode/*/edit.edit-body\r\nadmin/content/types/add.edit-help\r\nadmin/content/node-type/*.edit-help\r\n*@node/*/edit.edit-body\r\n*@node/add/*.edit-body\r\n";s:11:"simple_incl";s:0:"";s:7:"default";s:1:"t";s:11:"show_toggle";s:1:"t";s:5:"popup";s:1:"f";s:4:"skin";s:4:"kama";s:7:"uicolor";s:7:"default";s:16:"uicolor_textarea";s:95:"

\r\n Click on the UI Color Picker button to set your color preferences.

\r\n";s:12:"uicolor_user";s:7:"default";s:7:"toolbar";s:10:"DrupalFull";s:6:"expand";s:1:"t";s:5:"width";s:4:"100%";s:4:"lang";s:2:"en";s:9:"auto_lang";s:1:"t";s:18:"language_direction";s:7:"default";s:10:"enter_mode";s:1:"p";s:16:"shift_enter_mode";s:2:"br";s:11:"font_format";s:35:"p;div;pre;address;h1;h2;h3;h4;h5;h6";s:17:"custom_formatting";s:1:"f";s:10:"formatting";a:1:{s:25:"custom_formatting_options";a:6:{s:6:"indent";s:6:"indent";s:15:"breakBeforeOpen";s:15:"breakBeforeOpen";s:14:"breakAfterOpen";s:14:"breakAfterOpen";s:15:"breakAfterClose";s:15:"breakAfterClose";s:16:"breakBeforeClose";i:0;s:10:"pre_indent";i:0;}}s:8:"css_mode";s:5:"theme";s:8:"css_path";s:0:"";s:9:"css_style";s:5:"theme";s:11:"styles_path";s:0:"";s:11:"filebrowser";s:4:"imce";s:17:"filebrowser_image";s:4:"imce";s:17:"filebrowser_flash";s:4:"imce";s:13:"UserFilesPath";s:12:"%b%f/uploads";s:21:"UserFilesAbsolutePath";s:14:"%d%b%f/uploads";s:20:"ckeditor_load_method";s:11:"ckeditor.js";s:22:"ckeditor_load_time_out";s:1:"0";s:21:"forcePasteAsPlainText";s:1:"t";s:15:"theme_config_js";s:1:"f";s:7:"js_conf";s:0:"";s:10:"excl_regex";s:222:"#(?:^.*@node/add/.*\\.edit-body$)|(?:^.*@node/.*/edit\\.edit-body$)|(?:^.*@admin/content/types/add\\.edit-help$)|(?:^.*@admin/content/node-type/.*\\.edit-help$)|(?:^.*@node/.*/edit\\.edit-body$)|(?:^.*@node/add/.*\\.edit-body$)#";s:17:"simple_incl_regex";s:0:"";}');

--
-- Dumping data for table `ckeditor_role`
--

INSERT INTO `ckeditor_role` (`name`, `rid`) VALUES
('Basic', 2),
('Extra', 4),
('Extra', 5),
('Extra', 6),
('Extra', 7),
('Extra', 8),
('Extra', 9),
('Full', 3), - - my "admin" role
('Full', 15); - - my "webmaster" role

rhimes’s picture

FileSize
7.75 KB

hey - just noticed that the `ckeditor_settings` table export above was truncated, I guess by whatever filter is used on comments here - so I've attached a text file:

rhimes’s picture

are these the exports you needed?

rhimes’s picture

any ideas yet?

boabjohn’s picture

@rhimes: sorry not to read carefully...I'm skimming for another issue. But this might help: make sure u1 is *also* assigned one of the roles (admin, etc). For some reason u1 does not seem to automatically get the highest possible privileges out of the box...u1 has to be assigned a privileged role.

Otherwise, we u1s are just authenticated users...nothing more!

hth...chrz

rhimes’s picture

@boabjohn - you're KIDDING!!??

I never thought of that! With any other module, U1 always inherits all permissions/privileges - took your advise, added a role, and VOILA! U1 now gets necessary toolbars - THANKS!

Now, shouldn't I have read this in install instruction somewhere? AFAIK, as I scoured them repeatedly, don't believe this is mentioned ANYWHERE.

boabjohn’s picture

Component: User interface » Documentation

ahem...(shuffles) well yes, I hate to confess but this problem has nailed me to a standstill not once, but several times. Very happy to hear my pain has helped to ease yours...

In terms of the doco, yep: it should be an entry in two places. How about:

README.txt replace current point 5 with:

5. Under "Administer > Site configuration > CKEditor", adjust the ckeditor profiles. 

Profiles determine what options are available to users based on system-wide roles. Configure options for roles as desired. Note: User 1 must be assigned a system role that corresponds to the privileges required. If no role is assigned to User 1, they will have the privileges of "authenticated user"

In each profile you can choose which textareas will be replaced by CKEditor, select default toolbar and configure some more advanced settings.

TROUBLESHOOTING.txt add new dot point:

*User 1 does not have access to full toolbar 

User 1 must be assigned a system role that corresponds to the privileges required.  If no role is assigned to User 1, they will have the privileges of "authenticated user". System roles are defined at: /admin/user/roles

NB: congrats to the maintainers for having a TROUBLESHOOTING guide in the first place...

Hope this helps!

boabjohn’s picture

Status: Postponed (maintainer needs more info) » Needs review
klonos’s picture

@boabjohn: I monitor the project's issue queue and frankly there are so many bugs and quirks that I am really hesitant to start using it. Anyways, if what you mention about u1 not automatically gaining all privileges is true (which it actually is), and if it has been identified as the root of other issues as well, is there any solid reason why #766680: User1 != authenticated is set to 'postponed' and not mark as 'critical'? I think not! I believe we should make some noise in that issue, in order to draw attention to it.

ElegantSolutions’s picture

I just fixed mine.

Has anyone else noticed that there is a setting in the user management (admin/user/user) configuration that says:

Rich text editor settings

I went into this and found that my user 1 was not set to Drupal full toolbar. Apparently, the local user config overrides the global configuration.

wwalc’s picture

Status: Needs review » Fixed

Setting as fixed, however if you would like to help in correcting README.txt to make it better, I really encourage you to do it.

Simply let me know what exactly to put into README.txt and that's it. Just make sure that's it's something important that you were really missing during installation.

ElegantSolutions’s picture

@wwalc

Suggested change to the readme.txt.

5. Under "Administer > Site configuration > CKEditor", adjust
the ckeditor profiles. In each profile you can choose which textareas
will be replaced by CKEditor, select default toolbar and configure
some more advanced settings. Also remember to verify the setting of
the "Rich text editor settings" in admin/user/#/edit that can override the profile selection.

Or you could be added to the troubleshooting section also.

wwalc’s picture

Status: Fixed » Active
wwalc’s picture

Status: Active » Fixed

Fixed docs in CVS. thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Ludo.R’s picture

Isnt it possible to do something like this ?

$full_toolbar_roles = array('admin', 'webmaster');
foreach($user->roles as $role) {
	if (in_array($role, $full_toolbar_roles) || $user->uid == 1) {
		//Show full toolbar
	}
	else {
		...
	}
}

I mean putting this kind of logic inside the module.

pablofun’s picture

Issue summary: View changes

.