Support » Plugin: Custom Access Roles » nothing shows to add a user role

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author room34

    (@room34)

    Can you provide some more details, and possibly a screenshot? Is the page completely blank? You should be seeing something similar to the attached screenshot.

    Screenshot from Custom Access Roles

    Note that you do need to have the Administrator role to make changes. (However, you shouldn’t even be seeing the Custom Access Roles link without that role, so if that’s the case, let me know.)

    Completely blank for me too. I do have Admin access. This is what the blank page shows after my UTL wp-admin/users.php?page=caroles

    • This reply was modified 1 year, 11 months ago by  saraohara.
    • This reply was modified 1 year, 11 months ago by  saraohara.
    Plugin Author room34

    (@room34)

    I’m sorry to hear you’re having trouble with the plugin.

    I just tested it on another site I haven’t used it on before, and it’s working fine. It’s possible this is a conflict with another plugin. Can you try turning off other plugins, one by one, and see if that fixes it? If it does, let me know which plugin it is and I’ll try it out.

    Alternately, if you’re OK with giving me a list of all of the other plugins you have installed, I can test it out myself.

    Also… if you happen to know or can find out what version of PHP is running on your server, that would be helpful. I’m testing on a server that’s running PHP 7.0, but if the server is on at least 5.6 (or probably even 5.5) it should work. Earlier than that is not recommended for WordPress anyway, but I’ll see what I can do. (My guess here would be that I’m using a function that’s only in a later version of PHP than what you’re running on.)

    • This reply was modified 1 year, 11 months ago by  room34.

    Hey, thanks for the quick response – not the case usually! I’m using it on a test site to see if it works with lots of plugins I’ve tested before so it could be one of them conflicting. Before i bother deactivating them please tell me if it will do what I want – give access to a PAGE (not a post) for just one user to edit (well, plus the admin, of course). Thanks!

    Plugin Author room34

    (@room34)

    Well… it’s a bit tricky to explain. I created the plugin because I couldn’t find one that did what I needed, just the reverse.

    The problem this solves is a situation where you have a user who should ONLY have access to edit certain pages, NOT all of the pages. It sounds like you might be describing a situation where you have a certain PAGE that you only want that one user to be able to edit.

    The specific situation was that this was for a large website (100+ pages) for a college, with a number of users who need to be able to log in and ONLY edit the content of the pages for their department — the library, the college radio station, etc. but NOT be able to edit any of the other pages outside of that set.

    Because this plugin lets you assign exactly the set of permissions for a role, and the pages that role applies to, you MIGHT be able to make it do the opposite, but I’d have to think through the logic a bit more to be sure. I think you’d actually have to set up a custom role for all of the users EXCEPT this one user. Give that custom role editor-level access to all of the pages except the one you want to restrict. Then use the built-in “editor” role for the one user you want to be able to access that special page (and, presumably, every other page as well). Does that make sense?

    • This reply was modified 1 year, 11 months ago by  room34.

    What you did is exactly what I need. The page will be viewable to the public but when the designated person logs in to edit it all they see is that one page to edit – not the whole website. I just cleaned out my test site – removed all Themes and am using Twenty Sixteen. Only Plugins are Akismet, Layer Slider, slider revolution, Mogo marketplace – but none are activated. I also deleted your Plugin and then re-installed it. Do you think it might work if I did a clean WordPress install? Thanks for helping!

    Plugin Author room34

    (@room34)

    Yes… trying it with a clean install would be good. I’m thinking more that it may be something specific to the PHP version. If you have direct FTP access, you could drop in a PHP file at the top level of the site with just the following code:

    <?php phpinfo();

    Load that page in a browser and see what it says for the PHP version. (Then be sure to delete it when you’re done.)

    Darn, I did a whole new install using just basic Twenty Sixteen and still a blank page. I don’t feel comfortable playing with the code. I’m tried on Firefox and Chrome. Has it worked for others?

    Plugin Author room34

    (@room34)

    I haven’t heard from anyone else that it definitely is working for them, but I’ve had it working successfully on 5 or 6 different sites myself, and I see it’s currently installed on 40+ sites through the WP Plugin Directory.

    I found this plugin that will get you the phpinfo data without writing any code. Can you install it and let me know what it says about the PHP version?

    https://wordpress.org/plugins/wordpress-php-info/

    Plugin Author room34

    (@room34)

    I found a tool to test code against specific versions of PHP. I determined that there’s a particular code structure I’m using (anonymous functions) that was introduced in PHP 5.3, so if you’re running on an earlier version of PHP than that, the plugin won’t work.

    However, the anonymous function was really not necessary, so I have reworked the plugin not to use it. Version 1.0.2 is now in the plugin directory and should be available for you to download as an update shortly.

    I’m not positive this is the only issue, or is the reason for the problem you’re having, but it’s my best guess at the moment. I’m also not entirely sure that this anonymous function was the ONLY problem that the plugin would have with earlier versions of PHP — again, I would recommend at least 5.6 if possible, as that’s the recommended version for WordPress in general — but it seems like a good place to start. Let me know if things work for you after the update. Thanks!

    • This reply was modified 1 year, 11 months ago by  room34.

    “Custom Access Roles” also displays a blank page for me. I’m using php 5.3.3 on RedHat 6.8 (latest release) with a couple other plugins. The apache error log shows:

    [Tue Oct 25 10:03:26 2016] [error] [client {…}] PHP Fatal error: Can’t use method return value in write context in {…}/wp-content/plugins/custom-access-roles/caroles_admin.php on line 205, referer: https://{…}/wp-admin/users.php

    Your plugin sounds like it would do exactly what I need but I’m afraid rev’ing php may break the many other sites on the box.

    Plugin Author room34

    (@room34)

    Thanks for providing these details. I’m not sure I’m going to be able to provide compatibility with a version of PHP that old. That said, I just checked and as of now WordPress still officially supports as far back as 5.2.4, so I’m going to look into this issue and roll out a fix later today if possible. I’ll post an update here once it’s available.

    Plugin Author room34

    (@room34)

    I’ve just checked version 1.0.3 into the repository, which should resolve this issue. It will take a few minutes for it to show up in the repository, and a bit longer for it to show up as an available update in WordPress admin. Once it’s available, can you test it and see if it works for you? I don’t have access to a system running PHP 5.3.x so I can’t test it myself. Thanks!

    I apologize for the extreme delay in getting back to you on this – but it works! It works perfectly, actually.

    Thank you so much for your efforts on this plugin. It does exactly what we need.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘nothing shows to add a user role’ is closed to new replies.