In case you try to use Role Scoper with relatively long custom post types (or taxonomies), you may easily hit the maximum column size in RS database tables.
Currently (in RS 1.3.56) the maximum column size for the column
wp_user2role2object_rs.role_nameis 32 characters. RS constructs its post type or taxonomy specific role names by adding a prefix (like _manager or _editor) to the post/taxonomy type identifier.
For example, I had a custom taxonomy with an id “events_pdcategories_course”. Because RS’s “Course Category Manager” was given a name “events_pdcategories_course_manager”, the role name does not fit into database anymore and gets truncated.
RS does not give any warning but silently truncates the value in the database, making erroneous behaviour.
A symptom for this kind of situation is that RS drops the selections for these “long taxonomy” roles.
The workaround is to alter the RS database tables with following SQL command:
ALTER TABLE wp_user2role2object_rs MODIFY role_name VARCHAR(64) NOT NULL;
Note that you need to repeat this on each blog on your network.
- The topic ‘[Plugin: Role Scoper] Compatibility with long custom post types’ is closed to new replies.