Change WordPress user roles and capabilities Forums Bug Reports User Access restrict to return 404 error

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #3549
    Vladimir
    Keymaster

    I got a theme copy. Thanks. I will test it tomorrow.

    #3550
    gcacciola
    Participant

    Found it! I went to user-role-editor-pro/includes instead of /pro.

    I thought that pro on the beginning was the ending of “user role editor pro”.

    Well, sent you the copy.

    I did the coding you told me on line 166, but it didn’t work 🙁

    Still getting a blank page. the 404 is missing ( lol, the 404 is 404 hahhhaa)

    #3551
    Vladimir
    Keymaster

    Coding you made is related to the default value for a new added post bug you discovered recently.

    I will try to repeat the 404 issue with your theme tomorrow and search a solution in case of success.

    #3552
    gcacciola
    Participant

    Ops! Sorry, my bad! I am getting confused already!
    Well, in that case, I can confirm that it worked. I created both new page and new custom post type article, and they came with 404 marked as default after the coding! Great job!

    #3558
    Vladimir
    Keymaster

    Hi Giacomo,

    Good news – I repeated a described issue. Trying to open prohibited by URE (action HTTP 404) page with active wOffice 2.4 does not show theme’s 404 page. Trying to open really unexisted page shows theme’s 404 as expected.

    So I will investigate a reason of this conflict and contact your then, may be tomorrow.

    #3560
    gcacciola
    Participant

    Great, I am not doing anything wrong then.
    It is horrible when we describe bugs that cannot be reproduced.
    I am glad you will look into it. Thank you so much.

    #3565
    Vladimir
    Keymaster

    Hi Giacomo,

    A quick fix for the empty 404 page problem is to add lower priority to the URE Pro’s post filter. You can open user-role-editor-pro/pro/includes/classes/content-view-restrictions-posts-list.php and replace line #17

    
    add_action('pre_get_posts', array($this, 'hide_prohibited_posts'));
    

    with this version

    
    add_action('pre_get_posts', array($this, 'hide_prohibited_posts'), 100);
    

    A reason of this conflict the woffice theme applies its posts restrictions filter even if restricted posts list is empty. Applying this filter theme overwrites the same filter set by URE Pro little earlier. So a restricted page exists for WordPress and WP tries to show it, but with empty content as URE does not allow to view content of restricted post here too.

    #3571
    gcacciola
    Participant

    Great, it worked perfectly. Will it be embedded on a future update?

    Regards.

    Giacomo

    #3572
    Vladimir
    Keymaster

    Hi Giacomo,

    Thanks for the feedback.
    Yes, I included this fix to the code. I will publish it with the next update.

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.