Forums

Role Scoper
Auto save resets category to default (26 posts)

  1. garenor
    Member
    Posted 7 months ago #

    I have a strange issue with Role Scooper. I have a user account that is in user group Editor. I have given this user privileges to post in certain categories.

    Logged in as this user I can post to those categories, no problems there. But, if i leave the "write screen" open, the autosave resets the post category to default. Nothing changes visibly in de write screen, but if check the site, that post has been moved to the default category. If I just hit the save button once again, everything is ok, and the message has been returned to the category I originally put it in.

    This behavior is gone if I disable Role Scoper.

    I use Role Scoper version 1.3.46.

    http://wordpress.org/extend/plugins/role-scoper/

  2. kevinB
    Member
    Posted 7 months ago #

    I'm having trouble reproducing this.

    Do you have any category restrictions set? Does it still occur with other plugins temporarily disabled?

  3. garenor
    Member
    Posted 6 months ago #

    Thanks for the response.

    I temporarily disabled all plugins, problem persists. So it is no other plugin that is causing the problem. I also tried disabling the role scooper plugin, the problem is gone then. So it is something regarding role scooper.

    I shall try to explain it as good as I can:

    All categories are restricted by default (Post contributor, author and editor, category manager and assigner. I created an user account and added this user to the custom ERD_algemeen group. I then added this group to "post editor" of every category. As far as I understand, that user can now post and edit every article posted in those category's right?

    But than if I login with that user account , and edit an article witch is posted to an other category than the default one (just opening) and wait a minute, the category will change to the default one... (but it will only show on the edit screen when you refresh). Same result for super-admin user)

    I hope this info helps...

  4. kevinB
    Member
    Posted 6 months ago #

    Same result for super-admin user

    Oh, so this is on a multisite install?

  5. garenor
    Member
    Posted 6 months ago #

    wrong term, sorry. No is on single install. Sorry;

  6. kevinB
    Member
    Posted 6 months ago #

    Is this on WP 3.2.1 ?

  7. garenor
    Member
    Posted 6 months ago #

    Role Scoper Version: 1.3.46
    Database Schema Version: 1.1.4
    WordPress Version: 3.2.1
    PHP Version: 5.3.3

  8. kevinB
    Member
    Posted 6 months ago #

    I have your role and restriction configuration duplicated exactly (testing with a WP Subscriber) and still don't see it.

    Have you customized any of the capability definitions for the Post type? In particular, RS will probably work best if you leave the default assign_terms cap equal to 'edit_posts'

  9. kevinB
    Member
    Posted 6 months ago #

    I was never able to reproduce this. A few more things you could do:

    * let me know what browser and version it happens with
    * use a browser debug tool to check for JS errors
    * check your PHP error log
    * test it on a different server, preferably with a later PHP version (current stable is 5.3.8)

  10. garenor
    Member
    Posted 6 months ago #

    I appreciate your time and help. I will do some further testing. I will keep you posted!

  11. garenor
    Member
    Posted 6 months ago #

    - I tested this on Safari 5 (latest Mac version, main browser), Firefox (Mac, latest version ), Internet explorer 8 on Windows 7. Same results.

    PHP log shows nothing wrong. The only javascript errors I see is (sorry, dutch...):Gebruik van getAttributeNodeNS() wordt afgeraden. Gebruik in plaats daarvan getAttributeNS().

  12. kevinB
    Member
    Posted 6 months ago #

    So that ajax call is going out with an empty catslist arg?

    It would be interesting for you to
    define('SCRIPT_DEBUG', true);

    ...and then debug these lines in autosave.dev.js :

    goodcats = ([]);
    jQuery("[name='post_category[]']:checked").each( function(i) {
      goodcats.push(this.value);
    } );
    post_data["catslist"] = goodcats.join(",");

    There's no filtering happening at that point; I don't it would fire a blank if the category checkbox is actually checked.

  13. garenor
    Member
    Posted 6 months ago #

    Arrgh. It was missing a few times. But not anymore. Problem persists.

    Going to test tomorrow on an other install. I'ts beginning to drive me crazy!!

    Admin user account is not having the problem though. (I was on the impression it was).

  14. garenor
    Member
    Posted 6 months ago #

    I'm using the BOLDNEWS theme from whoo themes.

    I installed a fresh wordpress 3.2.1 with only Role Scoper plugin with above settings and BOLDNEWS theme. As soon as I activated the theme, the problem begins... So, it's probably a compatibility problem with the woo framework.

  15. kevinB
    Member
    Posted 6 months ago #

    What if you put this in role-scoper/admin/filters-admin-term-selection_rs.php, function scoper_filter_terms_for_status :

    if ( defined( 'DOING_AUTOSAVE' ) )
      return $selected_terms;

    Put it just above global $scoper;

  16. garenor
    Member
    Posted 6 months ago #

    No result...

    I have sent you a link to a youtube video what explains it a little further, so you know my settings and so on.

  17. Gioggiolo
    Member
    Posted 6 months ago #

    Same problem here. I will try to find the cause

  18. kevinB
    Member
    Posted 6 months ago #

    I'm not dropping this but I need to clear some other tasks first.

  19. garenor
    Member
    Posted 6 months ago #

    @Gioggiolo: Are you also using a Woo theme? If yes, witch one?

  20. Gioggiolo
    Member
    Posted 6 months ago #

    No, i have a wpzoom theme.
    I have no problems using Admin user, while it happens using Editors and Contributors... maybe Authors.
    I have set:
    Editors can: manage users and all posts.
    Contributors can: manage all posts.
    Authors can: manage all their posts.

    I have restricted just a category (called Staff) with following settings:
    Post Reader Restricted for category
    Private Post Reader Restricted for category
    Post Contributor (Unrestricted by default)
    Post Author Restricted for category
    Post Editor (Unrestricted by default)
    Category Manager Restricted for category
    Category Assigner Restricted for category

    Anyway i temporally solved disabling the autosave.

  21. garenor
    Member
    Posted 5 months ago #

    Is there a solution coming for this issue? I am cleaning out my "bug list" but this one still at the top of my list ;)

  22. kevinB
    Member
    Posted 5 months ago #

    Are you still seeing this with Role Scoper 1.3.51? It includes another fix related to post category assignment.

  23. garenor
    Member
    Posted 5 months ago #

    Yip, still there unfortunately.

  24. oxfordian3
    Member
    Posted 4 months ago #

    I am also having this problem, with Role Scoper 1.3.51. I have Contributors who are limited to a single category. When they update a post in their category and Publish/Save it, it will sometimes revert to Uncategorized, even though they made no edit to the Categories.

    I made customizations to the Post Editor to hide the Categories from the page, since they are not supposed to edit them. The problem occurs when this customization is not included and the contributor simply doesn't edit the category.

    This is our top-priority problem, as we use Categories extensively to configure our site as a multi-user CMS with user-to-category-based access.

    Our particular admin for conributors prevents access to changing categories, so all I need to do is eliminate RS from modifying categories at all. Can you advise where this occurs?

  25. oxfordian3
    Member
    Posted 4 months ago #

    After further debugging, I see that Role Scoper is not at fault.

    The problem was in our own theme code for setting up post categories, which had a call to wp_set_post_categories with a single Category ID number (rather than the correct array of ID's) as the second arg. This is incorrect. It seemed to be working on post creation, but I suppose it was really RS that was doing that work.

  26. kevinB
    Member
    Posted 4 months ago #

    garenor, you might want to take a look at the fix I suggest here (or try the development code later once I update it to 1.3.54-dev).

Reply

You must log in to post.

About this Plugin

About this Topic