cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 404 Error if going from product page via category to cms page

SOLVED

Getting 404 Error if going from product page via category to cms page

Hi,

I am getting a 404 error when I do the following:

 

1. www.site.com/category/product then try to go straight to a cms page. URL starts as www.site.com/category/subcategory/product.html If I then select 'About Us' (or any CMS page) link URL changes to

www.site.com/category/subcategory/about_us then I get the 404 error

 If I select 'About Us' link from home page or product only page (selecting product from home page and not going in via categories) I get no error. URL looks like

www.site.com/about_us - the correct page is displayed or

www.site.com/product.html then select 'About Us' the url changes back to www.site.com/about_us without any errors..

6 REPLIES

Re: Getting 404 Error if going from product page via category to cms page

Hi @Chucky_66,

 

Are you using a custom theme?

What if you use RWD?

Can you share a public URL to test?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Getting 404 Error if going from product page via category to cms page

Hi Damian,

I am using a custom theme - TemplateMela - MAG090172.

I think I am using RWD.

If I go to: https://www.electronicsrevolution.com.au/ - any product on home page - about us = ok

If I go to: https://www.electronicsrevolution.com.au/ - any category - about us = 404 error.

https://www.electronicsrevolution.com.au/av-audio-visual/projectors/about_us

It holds on to the category in the URL.

Sorry I don't know much about programming.

Cheers, 

Re: Getting 404 Error if going from product page via category to cms page

Hi @Chucky_66,

 

I'm pretty sure there is an error on how the menu was built. I guess you're using just the page inditifier without the store URL.

Can you configrm if the menu is a cms block?

In that case can you share the block? If not, hwo was built?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Getting 404 Error if going from product page via category to cms page

Hi @Damian Culotta

I just used the documentation link that came with teh download.

For the footer menu the code was:

 

5) Create CMS Link Block for Footer.
Goto Admin panel -> CMS -> Static Blocks. Click on Add New Block Button and write below detail. 
      Block Title :- tm_footer_staticlink 
      Identifier :- tm_footer_staticlink 
      Content :-  Click on this button and Add Below Code in HTML Content: 

<div class="static_link1">
<h6>Information</h6>
<ul>
<li><a href="#">About Us</a></li>
<li><a href="#">Delivery Information</a></li>
<li><a href="#">Privacy Policy</a></li>
<li><a href="#">Term & Condition</a></li>
<li><a href="#">Privacy Account</a></li>
</ul>
</div>
<div class="static_link2">
<h6>Customer Service</h6>
<ul>
<li><a href="#">Customer Assistance</a></li>
<li><a href="#">Net Transaction</a></li>
<li><a href="#">Delivery Information</a></li>
<li><a href="#">International Shipping</a></li>
<li><a href="#">Shipping Information</a></li>
</ul>
</div>
<div class="static_link3">
<h6>My Account</h6>
<ul>
<li><a href="#">My Product</a></li>
<li><a href="#">My Orders</a></li>
<li><a href="#">My Address</a></li>
<li><a href="#">My Personal Info</a></li>
<li><a href="#">My Status</a></li>
</ul>
</div>

and Click on "Save Block" Button.

 

For the menu above the banner (beside the 'Categories' drop down:

 

8) Create Static Link Block For Menu.
Goto Admin panel -> CMS -> Static Blocks. Click on Add New Block Button and write below detail. 
      Block Title :- tm_advancedmenu_staticlink 
      Identifier :- tm_advancedmenu_staticlink 
      Content :-  Click on this button and Add Below Code in HTML Content: 

<ul>
<li><a href="about-magento-demo-store ">About Us</a></li>
<li><a href="privacy-policy-cookie-restriction-mode ">Privacy Policy </a></li>
<li><a href="customer-service">Customer Service </a></li>
</ul>

and Click on "Save Block" Button.

Re: Getting 404 Error if going from product page via category to cms page

Hi @Chucky_66,

 

Try this.

Edit the block called: tm_advancedmenu_staticlink 

 

Into that block change the links to looks like:

 

<ul>
    <li><a href="{{store _direct="about-magento-demo-store"}}">About Us</a></li>
    <li><a href="{{store _direct="privacy-policy-cookie-restriction-mode"}}">Privacy Policy</a></li>
    <li><a href="{{store _direct="customer-service"}}">Customer Service</a></li>
</ul>

Basically you'll put your page url into:

 

{{store _direct="your-url-or-cms-page-identifier"}}

Then save the block, clean cache and try again with those links on frontend.

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: Getting 404 Error if going from product page via category to cms page

Hi @Damian Culotta

Thank you so much. It works perfectly.

You're a genius!! I've been working on this site for 8 months with no income generated. I'm just about to lose my house so I hope this will turn the site around without any more errors.

Thank you again,

Cheers,