Access Blocked

Posted 07/03/22 by Kasey Norton

I clicked around my site as a visitor and found that when I got to the areas where membership is required for access that it says this:

Access Blocked
This page is not available or you may not have permission to perform a requested action on this page.

How do I edit that to have it point toward the join link?


Posted by Dan Vis on 08/25/20
That's exactly what we're doing here. :) Good analogy Kasey!
Posted by Kasey Norton on 08/25/20
And when I deep clean my house, it get messier before it get cleaner. The end result is worth it every time. :) You're doing awesome!
Posted by Dan Vis on 08/25/20
Problem is I sometimes break one thing when fixing something else! :)
Posted by Kasey Norton on 08/25/20
I'm not complaining a bit about all your hard work!
Posted by Dan Vis on 08/25/20
Sorry about the glitches on your access Kasey. I tightened things up a bit TOO much in our most recent upgrade. I think I've got everything fixed up for your site now...
Posted by Kasey Norton on 08/24/20
Ahhh I am clearly not catching on to as much as I thought if I didn't even understand how to do something so simple!
Posted by Dan Vis on 08/23/20
Kasey, I'm not sure what you mean by "searching for it". Just go to it. Type this into your browser: Then click the edit action.

Backup, I see I neglected to upload the site.pages.actions page. It's there now and you can now get to the "blocked" action that way as well. I'm just so used to going straight to the page I wouldn't have even thought about using that...
Posted by Kasey Norton on 08/23/20
Dan When I search for page action.blocked I don't find it. There's a small question mark beside action on the page search.
Posted by Dan Vis on 08/23/20
Kasey, that is page action.blocked. You can edit however you like.

If you want, you could try adding these few lines to the page content:

[if ! login]<(include action.login#form)>
Don't have an account? [[welcome.join|Click here]] to join now...[if]
[if submit LOGIN]<(forward members)>[if]

That should pull in a login form they can use to login right then and there and then take them to the page they wanted to see when they do login. And if they don't have an account, there is a link to create one.

In some cases the error may forward them to action.blocked (see the url), rather than just displaying the blocked action over the current page. You can tell by the url:

If it does that, the action page can't tell where to send them, so the last line bump them over to your main "members" page. To prevent these situations, we could change the page sending them to the error page and change line one to line two:

<(forward action.blocked)>
<(forward {p}&action=blocked)>

My suggestion is you try it (if you want) then do some testing and see how it works. If it seems to work well, we could add this to the core code... I'm tempted to do that anyway...
Posted by Kasey Norton on 08/23/20
Dan Sorry, forgot to tag you :)

Join Us

To read more posts, or to leave a comment, join our FREE community...