Jump to content

Strange behavior of Prestashop while enabling friendly urls (V 1.6.1.10)


gorllzz

Recommended Posts

Hello everybody!

 

I'm creating a store for a client and right now I'm experiencing a totally strange behavior with Prestashop. The problem is that when friendly urls option is enabled, by accessing the index page of the store, the ProductController is called and product.tpl is shown. When I disable friendly urls the homeFeatured module class is called and corresponding .tpl is shown as it is supposed to be.

 

I'll try to explain in details what I did before the problem occurred:

I decided to set as default language Spanish and deactivated english. Then I changed the format of the product url(from SEO+URLS), I disabled Friendly urls option and in the end I deleted .htaccess for making the changes to be reflected into the store. Then I enabled friendly Urls one more time (for recreating .htaccess) and  created some test products to do some testing. Everything seemed to be working well but when I deleted the products I started experiencing the problem explained above :S

 

Has anybody any idea why this is happening? Any clue will be helpful!! If I find anything I'll post back!

 

Thanks in advance!

Link to comment
Share on other sites

Hello again!

 

After a lot of debugging I found out what caused the error. I'm letting the solution in case someone else faces a similar problem.

 

In the end I had entered a bad value in my product url pattern in Seo+url option. What I wanted to achieve was the url to have the pattern of categoryName/productID/productName so I had enter this value:

{category:/}{id:/}{rewrite}{-:ean13}

which was not the correct pattern and resulted in ProductsController to be called.

 

The correct pattern is the one below:

{category:/}{id}/{rewrite}{-:ean13}

Cheers!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...