[SOLVED] Changing Page User Gets When Not Authorised

13 years 2 months ago - 13 years 2 months ago #153251 by MH1
If a user logs out (or is timed out) and tries to access content designated "Registered" or above, they get redirected to a page that says "You must log in first". The page has no option to login, but shows all CB registration fields.

The page is: option=com_comprofiler&task=registers

I'd like to change this to an article where I can display the cb_login module, along with a link to our registration processes, which are linked to subscription plans (we are using CBSubs and have two plans setup).

The problem with the register page that's currently displayed (apart from the fact that there's no option to just login), is that it shows all CB registration fields, many of which are hidden by CBSubs in our plans

How do I change the URL of this page?

Many thanks in advance.

Please Log in to join the conversation.

13 years 2 months ago #153394 by krileon

The problem with the register page that's currently displayed (apart from the fact that there's no option to just login), is that it shows all CB registration fields, many of which are hidden by CBSubs in our plans

Have you hidden those fields from registration on the Workflows tab of your plans or simply disabled those fields display on registration?

How do I change the URL of this page?

Please see CBSubs > Setting > Display > Expiration > Membership needed for access redirect URL for existing users:

You can configure the parameter to whatever your like. If the page in question is not the typically access page where a user needs to be subscribed to XYZ to view it then you can not change its URL. The access denied redirect is coded into the CBSubs Bot which is encoded. What it's doing is sending users away from Joomla registration/login to CBs. You can actually change what URL Joomla it self redirects to which might prevent the CBSubs bot from catching it so you can send users to say an article instead. Please see the below.

ARTICLES - HTML
IN: components/com_content/views/article/view.html.php
ON: Line 90
$mainframe->redirect($url, JText::_('You must login first') );

ARTICLES - PDF
IN: components/com_content/views/article/view.pdf.php
ON: Line 57
$mainframe->redirect($url, JText::_('You must login first') );

CONTACTS
IN: components/com_contact/views/contact/view.html.php
ON: Line 71
$mainframe->redirect($url, JText::_('You must login first') );

In the above simply change the $url to whatever you want for example 'index.php?option=com_comprofiler'. Do not include live site in the URL, always start with index.php.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 2 months ago - 13 years 2 months ago #153428 by MH1
The registration fields have been hidden using the workflows tab.

Thanks very much, I'll give it a try.

Please Log in to join the conversation.

13 years 2 months ago #153431 by MH1

krileon wrote: In the above simply change the $url to whatever you want for example 'index.php?option=com_comprofiler'. Do not include live site in the URL, always start with index.php.


Sorry to ask a simple question, but where does the URL go?

Please Log in to join the conversation.

13 years 2 months ago #153435 by krileon

The registration fields have been hidden using the workflows tab.

The fields only hide if the plan is actually selected. If this isn't working then there's probably a fatal JS error on the page; please check your browser error console.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

13 years 2 months ago #153454 by MH1
All sorted now, thanks for your help.

Both plans had "Propose spontaneously plan at registration" in workflows set to "No", so the standard, full CB registration form (no hiding of fields) was being displayed.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.233 seconds

Facebook Twitter LinkedIn