Jump to content

CMS Links Don't Work when using Friendly Url - 1.4 RC2


Recommended Posts

  • 1 month later...

Just recently updated to version 1.4.0.17 and I had the same problem.

I ended up doing a fresh install, however prior to doing that I did two things that solved the problem.

1.) I changed permissions of the modules folder to 755 (which they should be in the first place, official Prestashop wiki gives incorrect English instructions for folder permissions)

2.) Secondly at the same time I edited the htaccess file. I could not tell you the exact changes that I made to the htaccess file because as I said above I actually did a fresh install even after fixing these problems. However hopefully this at least gives you some idea as to where to start in order to solve your problem. I can pretty much tell you with a good deal of certainty that the problem lies in one of these two areas above in your situation.

Good luck.

Link to comment
Share on other sites

Sorry DGV, things have indeed moved on since I posted that. The solution was identified in:

http://www.prestashop.com/bug_tracker/view/8489/


Adding the PS_INSTALL_VERSION config item to the PREFIX_configuration table and then regenerating the .htaccess file via the tools menu appears to have completely solved the issues I was having. Apparently the .htaccess was being generated differently for older installations and the decision on what the rules generated should be were based on this variable; which didn't exist. My .htaccess now has:

RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]



Which is what we thought the "correct" entries should be, only once that variable is set you don't have to manually edit the file after generation.

Paul

Link to comment
Share on other sites

As the discussion in the bug tracker says:

INSERT INTO `ps_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES
(’PS_INSTALL_VERSION’, ‘1.4.0.17’, ‘2011-03-20 12:00:00’, ‘2011-03-20 12:00:00’);


This means, go into the table ps_configuration (show its contents) and add a new row with the above array items
Link to comment
Share on other sites

  • 3 weeks later...

Hi,


I have added the new table in the database and refreshed the .htacces file but still get the same issue.

Is there anything else that would be causing this problem.

My .httaccess file looks like this:

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums



# URL rewriting module activation
RewriteEngine on

# URL rewriting rules
RewriteRule ^api/?(.*)$ /store/webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /store/img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /store/img/p/$1-$2.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /store/img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /store/product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /store/category.php?id_category=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /store/product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /store/supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /store/manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /store/cms.php?isolang=$1&id;_cms=$2 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /store/cms.php?isolang=$1&id;_cms_category=$2 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html /store/product.php?id_product=$3&isolang;=$1 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html /store/product.php?id_product=$2&isolang;=$1 [QSA,L]
RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*) /store/category.php?id_category=$2&isolang;=$1 [QSA,L]
RewriteRule ^address$ /store/address.php [QSA,L]
RewriteRule ^addresses$ /store/addresses.php [QSA,L]
RewriteRule ^authentication$ /store/authentication.php [QSA,L]
RewriteRule ^cart$ /store/cart.php [QSA,L]
RewriteRule ^contact$ /store/contact-form.php [QSA,L]
RewriteRule ^discount$ /store/discount.php [QSA,L]
RewriteRule ^guest-tracking$ /store/guest-tracking.php [QSA,L]
RewriteRule ^order-history$ /store/history.php [QSA,L]
RewriteRule ^identity$ /store/identity.php [QSA,L]
RewriteRule ^my-account$ /store/my-account.php [QSA,L]
RewriteRule ^order$ /store/order.php [QSA,L]
RewriteRule ^order-follow$ /store/order-follow.php [QSA,L]
RewriteRule ^quick-order$ /store/order-opc.php [QSA,L]
RewriteRule ^order-slip$ /store/order-slip.php [QSA,L]
RewriteRule ^password$ /store/password.php [QSA,L]
RewriteRule ^search$ /store/search.php [QSA,L]
RewriteRule ^sitemap$ /store/sitemap.php [QSA,L]
RewriteRule ^stores$ /store/stores.php [QSA,L]


# Catch 404 errors
ErrorDocument 404 /store/404.php


   ExpiresActive On
   ExpiresByType image/gif "access plus 1 month"
   ExpiresByType image/jpeg "access plus 1 month"
   ExpiresByType image/png "access plus 1 month"
   ExpiresByType text/css "access plus 1 week"
   ExpiresByType text/javascript "access plus 1 week"
   ExpiresByType application/javascript "access plus 1 week"
   ExpiresByType application/x-javascript "access plus 1 week"
   ExpiresByType image/x-icon "access plus 1 year"


FileETag INode MTime Size

   AddOutputFilterByType DEFLATE text/html
   AddOutputFilterByType DEFLATE text/css
   AddOutputFilterByType DEFLATE text/javascript
   AddOutputFilterByType DEFLATE application/javascript
   AddOutputFilterByType DEFLATE application/x-javascript








Thanks,

Dan

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...