Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Created Pages Throw 404 Rate Topic   * * * * * 1 votes

 
  • jeffshead
  • Member
  • Members
  • Join Date: 15-May 08
  • 121 posts

Posted 11 December 2016 - 11:08 PM #1

If a CS-Cart page is created with the admin and "Registered users" is the only usergroup box checked under Availability, shouldn't guests be prompted to login rather than get a 404 error when they land on the page?

 

If a user is already logged in and lands on the page, it displays as it is supposed to.

 

If this is by design, is there a way to display the login form rather than the 404 error? This is very confusing to users.


CS-Cart 4.6.3 SP1

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19797 posts

Posted 12 December 2016 - 08:25 AM #2

it is designed so. To change this behaviour, please open the following file
 
app/controllers/frontend/pages.php
 
and replace:
    if (empty($page) || ($page['status'] == 'D' && !$preview)) {
        return array(CONTROLLER_STATUS_NO_PAGE);
    }
with
    if (empty($page) || ($page['status'] == 'D' && !$preview)) {
        return array(
            CONTROLLER_STATUS_REDIRECT,
            'auth.login_form?return_url=' . urlencode(Registry::get('config.current_url'))
        );
    }

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.