Skip Navigation

[Résolu] Access Not Directing Restricted User to 404 Page

This support ticket is created Il y a 7 années. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 38 réponses, has 3 voix.

Last updated by Christian Cox Il y a 6 années et 11 mois.

Assisted by: Christian Cox.

Auteur
Publications
#511782
Setting to 404.png
Directs user to WP Login.png
Has to be set to 404 Layout.png

Hello Support... It appears I have come across a bug.

Access is activated for pages and a Post Group is applied to a single page. I have assigned the default 404 Page as what to display, but when the logged out user (Guest user) tries to access the restricted page directly they are taken to the default WP Login form not the 404 Page. See screenshots for greater detail.

If I manually apply the setting to the 404 Layout Template, all works as expected. I am using the Toolset Starter Theme with full Toolset Layout approach for everything.

Kind Regards,
Dave

P.S. It would be nice if there was a way to direct users to specific pages not just Layout Templets, e.g. a custom login or notice page. Please advise if I am missing something here as this seems like an obvious need.

#511854
results-404.png
post-group.png
post-type-pages.png

Hi, that's unusual. I have set Pages to be managed by Access, and Guests have "read" permission enabled. In my Post Group, guests do not have read permission. I have chosen to display the 404 page to them. Guests get redirected to a 404 page as I would expect. I've tried on both the stable Views 2.3.1 and the beta 2.4-b1. In both cases, I get shown a 404 page. Please see the attached screenshots.

- Could you share a screenshot of your settings in Access Controls > Post Types > Pages tab?
- Could you share a screenshot of your Layouts dashboard page? (/wp-admin/admin.php?page=dd_layouts)

#511870
Access - Pages Tab.png
Layout - Dashboard Page.png
Access - Groups Tab.png

Hi Christian... Here are the screenshots you requested. I noticed you specified the 404 page for Guests. I am using the default setting which should pull the default 404 setting from the parent "Read" settings. I included that screenshot as well.

#511884
Screen Shot 2017-04-10 at 5.55.58 PM.png
Screen Shot 2017-04-10 at 5.55.43 PM.png

I see, when I make those adjustments (Guest Read Access for Pages has default 404 setting, Post Group Guest has default 404 setting) I still see the Error 404 page instead of a login. Would it be possible for me to take a look at your wp-admin area to investigate further? I will enable a private reply area here so you can provide login credentials securely.

The day is closing out for me here but I will be back online tomorrow morning to follow up as soon as I can.

#512322

Hi, I was able to get the HTTP access code to work, but I'm not able to see the WP username and password information. Can you please resubmit those? I tried the same as the HTTP login but that didn't work.

#512325
Reading Settings.png
Post Page_1.png
Post Page_2.png
History not loading.png

Addendum...

It appears that the Static Posts page, when logged out, is also affected by this setting. See screenshots. The posts page in my setup is called History and when setting is activated it fails to work when logged out.

#512332

Enabling private reply again

#512337

Hi Christian... You can produce the error and see by the URL that user behavior is not working properly. Have a look at the behavior. You will also be able to produce the new issue I just uncovered as well as both have to do with behavior when logged out.

For legal reasons I can't grant FTP access as there are other active sites on this server that contain confidential student information. Also would prefer to not open up the WP Admin panel as I have a lot of Dev Testing info there and don't have any other record of it.

#512359

You can produce the error and see by the URL that user behavior is not working properly. Have a look at the behavior.
I can confirm the behavior you have described, when I am logged out and try to access the /dashboard page directly, am I redirected to the WP login area instead of the expected 404 page.

Quick test - please edit the Dashboard page and change the page slug to something other than "dashboard". Now visit the new dashboard URL as a guest, logged-out user. Are you redirected to the WP Login screen, or do you see the default Layout error message "You need to select a layout for this page. The layout selection is available in the page editor."?

when setting is activated it fails to work when logged out.
I'm not sure which setting you're referring to, but the History page is not in the TeamSDA Post Group, correct? So if I read your screenshots correctly, Guest users should be shown the History page because they have read access to pages. No Layout is assigned to the History page on the backend, hence the display you see that says "You need to select a layout for this page..."

I don't see anything obviously wrong, can you clarify the issue for me?

#512378
Page specific layout.png

OK Christian... I believe you found the Bug as it pertains to the first issue, using default 404 settings. If I use a different slug other then "dashboard" the issue goes away. Just as a reminder, this is only an issue when "Show 404 - page not found" is selected, not when using the "Show templet layout" selection is used.

SECOND ISSUE
As to the second issue, not sure if it is related to either of the settings I just mentioned or the use of Access. The issue just started but I also just installed the beta for Views and CRED. I did as you said and tried applying a page specific layout to the single History page but the prompt when logged out still persists. See screenshot.

Further I was not aware that a page specific templet layout needed to be defined as all pages have a defined layout and the History page is actually the Blog Static Page and the slug is "history".

#512397

Further I was not aware that a page specific templet layout needed to be defined as all pages have a defined layout
The images you posted can explain this a bit more. Take a look at the Dashboard image here:
https://toolset.com/forums/topic/access-not-directing-restricted-user-to-404-page/#post-511870
You can see a warning message that this Layout is not applied to 2 pages (at least one of those must be History). Then the History page image here: https://toolset.com/forums/topic/access-not-directing-restricted-user-to-404-page/#post-512325 - You can see that there is no Layout applied to this page. Perhaps another Layout was applied before you created Layout for Pages, then it was removed after you assigned the Layout for Pages? Regardless, after you applied the Layout directly, the default Layout error message is being displayed. That's not normal, so let's try to iron that out.

In your Layouts dashboard, look in the "Layouts being used to customize archives" section. I see that you have Layouts for Blog and Home. Hover over each of these Layouts and click "Change layout use". Uncheck every checkbox for each Layout, then click "Update". Then go to your History page, remove any Layout association and save. Then reapply the proper Layout here.

If this does not resolve the problem, the next troubleshooting step is to try to revert back to stable Views and CRED.

Let me know how it goes.

#512416
Page specific layout.png
After adding page spacific layout.png

Hi Christian... I believe you may of gotten a little confused by all the screenshots I provided. As you can see from the previous post's screenshot, I just applied a page specific layout along with the layouts that were assigned to the page type.

Everything was working prior to a day or so ago. The page was originally named Blog and I believe the slug name was blog or posts. No additional page specific layout was assigned as this page is the blog archive page. Both the Static Home Page and the Static Blog Page (History) are really both archive layouts. I reattached the Page specific screenshot along with the latest Layout dashboard page.

I did try your blog archive layout reset technique but it did not correct the issue. I also went through and reapplied all the static page setting and such but no change either. Lastly I removed the Views and CRED betas and used the production versions and again the issue persists.

#512673

Yes, I'm sure I've become confused looking at the screenshots. I'm not able to replicate this new issue on my own environment. In order to send the problem to our developers, I need to be able to provide them steps to reproduce the bug or a working site clone showing the problem. Since I can't access your wp-admin area or database, I think we need to come up with a better approach for collaborating on this. Can you replicate the issue on another site without sensitive data?

We have the discover-wp.com playground, where you could install a reference site and recreate your Pages and Layouts structure with Access settings. I think the Real Estate template has Access and Layouts plugins, so you could start there.

Otherwise I need steps to reproduce this from a clean installation of WordPress. Sorry for the inconvenience, but troubleshooting effectively becomes difficult if not impossible when I can't access the site having problems.

#512733

Hi Christian... Thank you for all your assistance. In regards to the Static Blog page layout issue. I did a quick test in a Toolset training site as suggested but the issue did not show up. I will do a little further testing on my end and get back to you.

In regards to the bug with Access not directing restricted user to the 404 page, when do you expect this to be resolved and how do I track the progress of bug fix's like this?

#512775

OK please do let me know if you are able to replicate that layout issue and I will investigate. If you find that you're stuck, it may make be more productive to try recreating your site pages and/or layouts from scratch rather than spin wheels trying to replicate the bug on another environment. My guess is that something got corrupted in the database, or it's a very specific use case bug.

Regarding the Access issue, I have escalated the problem to our 2nd tier support team, who will evaluate the details and let me know how to proceed. They may provide a workaround I'm not aware of, or they may escalate further to our developers. I'll let you know what I find out from our 2nd tier within a day or so, they usually respond overnight before I begin work in the morning. If they need to enlist development, this bug gets added to a queue where developers prioritize work for bugs and new features. As I see the ticket progressing, I will update you here.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.