[Skip to main content](#vessel-content)

#   404 error when on Category access is Customonised

##

- **[triotech](/forum/user/25968-triotech "View triotech's Profile")**
- [![triotech's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/25968-triotech "View triotech's Profile") Topic Author
- [ Away](/forum/user/25968-triotech)

Less More

- Posts: 72
- Thank you received: 0
-
-

5 years 7 months ago -  5 years 7 months ago [\#331613](#331613) by [triotech](/forum/user/25968-triotech "View triotech's Profile")  *[404 error when on Category access is Customonised](/forum/32-content-creation/902350-404-error-when-on-category-access-is-customonised#331613 "-- url of the page with the problem -- :   staging.blazeyuniforms.co.nz/copthorne  -- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.15 -- Browser(s) name and version -- : Firefox  Hello, for this page   staging.blazeyuniforms.co.nz/copthorne  when access is full, I can see the single product in this Brand (category?). However, when I chnage the Access from All to all but Public and Guest, the page comes up 404. I would have expected a 'you cannot access this page , please login message' and not a 404 error. If the front-end user is already logged in then the product is shown as you'd expect.  Is there a way to fix this?")* was created by *[triotech](/forum/user/25968-triotech "View triotech's Profile")*

-- url of the page with the problem -- : [ staging.blazeyuniforms.co.nz/copthorne](https://staging.blazeyuniforms.co.nz/copthorne)
-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.15
-- Browser(s) name and version -- : Firefox

Hello, for this page [ staging.blazeyuniforms.co.nz/copthorne](https://staging.blazeyuniforms.co.nz/copthorne) when access is full, I can see the single product in this Brand (category?). However, when I chnage the Access from All to all but Public and Guest, the page comes up 404. I would have expected a 'you cannot access this page , please login message' and not a 404 error. If the front-end user is already logged in then the product is shown as you'd expect.

Is there a way to fix this?

Last edit: 5 years 7 months ago by [triotech](/forum/user/25968-triotech "View triotech's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAyMzUwLTQwNC1lcnJvci13aGVuLW9uLWNhdGVnb3J5LWFjY2Vzcy1pcy1jdXN0b21vbmlzZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

5 years 7 months ago [\#331619](#331619) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[404 error when on Category access is Customonised](/forum/32-content-creation/902350-404-error-when-on-category-access-is-customonised#331619 "-- url of the page with the problem -- :   staging.blazeyuniforms.co.nz/copthorne  -- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.15 -- Browser(s) name and version -- : Firefox  Hello, for this page   staging.blazeyuniforms.co.nz/copthorne  when access is full, I can see the single product in this Brand (category?). However, when I chnage the Access from All to all but Public and Guest, the page comes up 404. I would have expected a 'you cannot access this page , please login message' and not a 404 error. If the front-end user is already logged in then the product is shown as you'd expect.  Is there a way to fix this?")*

Hi,

No that's normal. If you don't have access to a product / category / brand, then you don't see it in the products / categories / brands listing, and thus you don't know the URL of the product / category / brand and if you try to access it directly you get a 404 error.

Now I suppose that you created the URL [ staging.blazeyuniforms.co.nz/copthorne](https://staging.blazeyuniforms.co.nz/copthorne) with a menu item with the alias "copthorne" linked to this brand. What you actually want to do to redirect the users to the login form when they try to access that menu item is to set the "access" setting of the menu item.

Finally, if you really want to do it with the brand access level for some reason, it's not impossible, but it requires changing the line:
throw new Exception(JText::_('CATEGORY_NOT_FOUND'), 404);
in the files components/com_hikashop/views/product/view.html.php or components/com_hikashop/views/category/view.html.php (depending on the type of your menu item), with something like that:
JFactory::getApplication()-&gt;enqueueMessage('you cannot access this page , please login message');
JFactory::getApplication()-&gt;redirect(JRoute::_('index.php?option=com_users&amp;view=login'));

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAyMzUwLTQwNC1lcnJvci13aGVuLW9uLWNhdGVnb3J5LWFjY2Vzcy1pcy1jdXN0b21vbmlzZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[triotech](/forum/user/25968-triotech "View triotech's Profile")**
- [![triotech's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/25968-triotech "View triotech's Profile") Topic Author
- [ Away](/forum/user/25968-triotech)

Less More

- Posts: 72
- Thank you received: 0
-
-

5 years 7 months ago [\#331682](#331682) by [triotech](/forum/user/25968-triotech "View triotech's Profile")  Replied by *[triotech](/forum/user/25968-triotech "View triotech's Profile")* on topic *[404 error when on Category access is Customonised](/forum/32-content-creation/902350-404-error-when-on-category-access-is-customonised#331682 "-- url of the page with the problem -- :   staging.blazeyuniforms.co.nz/copthorne  -- HikaShop version -- : 4.4.1 -- Joomla version -- : 3.9.25 -- PHP version -- : 7.4.15 -- Browser(s) name and version -- : Firefox  Hello, for this page   staging.blazeyuniforms.co.nz/copthorne  when access is full, I can see the single product in this Brand (category?). However, when I chnage the Access from All to all but Public and Guest, the page comes up 404. I would have expected a 'you cannot access this page , please login message' and not a 404 error. If the front-end user is already logged in then the product is shown as you'd expect.  Is there a way to fix this?")*

thanks, my fall-back idea was using a menu access and not Brand access which does get me what I want. I just thought it was weird that it was a 404 page rather than a rendered theme page. Thanks

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMyLWNvbnRlbnQtY3JlYXRpb24vOTAyMzUwLTQwNC1lcnJvci13aGVuLW9uLWNhdGVnb3J5LWFjY2Vzcy1pcy1jdXN0b21vbmlzZWQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.047 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
