Jump to content

PS 1.5.1 always loading same page (links don't work) frontoffice and backoffice


tommylein

Recommended Posts

HI all,

 

I have a fresh 1.5.1 installation.

After having changed parameters in the Preferences-> SEO & Urls Menu pages get not loaded any more.

I did this:

  • Friendly URL = yes
  • Automatically redirect to Canonical URL = yes
  • Disable apache multiviews = no

 

When clicking any link (catrgory, product or whatever it shows the friendly url to load in the status bar of the browser and in the adressfield of the browser but it always reloads the same page.

In frontoffice it always relaods the "start" page in backoffice it always reloads the page I am currently on, neverthanless what ever I click on in the menu.

 

As a result I changed the SEO setting back to

  • Friendly URL = no
  • Automatically redirect to Canonical URL = no
  • Disable apache multiviews = no

 

Now it shows all links in frontoffice with non-friendly URLs like index.php?category=1.........

but is still shows the correct product page in the addressline of the browser but does always loads the same page (start page) whatever I click. Also backoffice is is behaving simmilar not loading any other page.

 

Switching back and forth again and again between

Friendly URL = yes or no and

Automatically redirect to Canonical URL = yes or no

does not makes the difference of links displayed friendly or not but makes no difference for loading. It always reloads the current page.

 

I have deleted the cache but this did not help.

I checked all file permissions but it did not help.

I cheked forums which say something about rebuilding htaccess in Tools -> generators but in 1.5.1 this is not available any more. I noticed that in 1.5.1 htaccess is generated after each change to in the SEO screen automatically.

 

Any ideas?

 

Regards

Tommy

Link to comment
Share on other sites

UPDATE:

 

It seems that the last shown page is the one which always comes up, even if another visitor visited that page.

For example: I asked a friend of mine to test and click on any product or category. Did not work. Start pages always re--loaded. By accident he managed to get to contact page.

When I open a browser on my pc than and got to my shop I see the contact page which my friend visited last.

Very strange. Any prestashop cache settings to adapt?

 

 

pS The apache server iteslf seems to be fine, I am just a client, other clients running webpages and webshops of any kind do not experience problems.

 

Regards

Tommylein

Link to comment
Share on other sites

I've got the same problem. Have you already found the solution?

 

Tried again with a fresh (updated) database. After positioning some modules and keeping friendly url off, it remains on the page not found, and the links don't work again. BUT when this happens when someone else tries, and your are currently logged in on the front office, the one which is logged in, can still do everything, and everything works.

Edited by M3rcury (see edit history)
Link to comment
Share on other sites

I have not found a solution yet, but some strange behavours.

 

After a fresh install everything worked fine unless I clicked the Advanced Parameters > Performance menu where I changed "template cache" to "force compile".

Clicking save the settings have not been saved in the database, but the problem described above came back.

It seems to be related to the .htaccess file which prestashop messes around with when visting the pages Advanced Parameters > Performance or Preferences > SEO & URLS. This time I did not change the friendly url settings I even .

This time the .htaccess seems not have changed but the problem is back.

 

The behavour described by M3rcury that for the logged in user everything remains working does not apply to me. It immedately stopped working and keeps always reloading the page I am currently on neverthanless what I have clicked (frontoffice and backoffice).

 

Based on my erlier suspicion I deleted the cache on the server in cache/smarty/cache. As a result I could get just ONE click further, whatever I clicked has been opening corretly. But any next click reloads the page I am currently on. -> Back to problem. Deleting the cache again I could get just ONE click further, than stuck again. And so on and so on.... (frontoffice and backoffice)

 

Conclusions:

  • The problem seems to start when trying to change settings regarding SEO & Urls or performance
  • Prestashop messes around with the .htaccess file which is one cause ot the problem but not the only one
    • (ps .htacess is a hidden file in the shop-root (most ftp-clients do not show it by default, check your ftp programm settings). If not created by yourself before shop installation it is created by prestashop which results in file-ownership of the user who owns running the webserver on your server, with apache this might be the detault-user 'www-data'. As permissions are set to 644 for this file by prestashop so you might not be able to edit an replace it once created by prestahop. You might not be able to change the permissions once you are not the server owner and just customer of a hosting company.

    [*]restoring .htaccess did not help this time so issue might have more than one root cause

    [*]smarty cache is involved

    [*]no permanent solution found so far other than re-installing the whole shop, which I really do not want to do again and again

Any help or experiences as result of behavour monitoring are welcome.

 

Thanks a lot !

Edited by tommylein (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

We encounter exactly the same problem. Like you said if i clear smarty/cache it takes me only one page further. If I turn off performance/cache then it all seems to work, but this can't be the solution ;-)

 

Have you found any solution yet?

 

Thx

Ben

Link to comment
Share on other sites

Yes, I found the solution 2 days ago.

 

Cause: Prestashop messes around with the .htaccess file when accessing the page SEO & URLS or PERFORMANCE

Solution: After installing prestashop save the .htaccess which can be found in your shop-root-dir to your local drive. Note: is is a hidden file, most ftp-programs do not show it by default.

 

Note: htaccess is generated during install by prestashop. As a result it might be ownes by the user who owns the webserver process i.E. apache uses user www-data as default.

 

If you are not the owner of the server but a customer on a hosting company create the root directory of your shop and an empty .htaccess file manually before you start the shop installation. As a result you are the owber of that file and are able to restore any time.

 

After you make changes to settings in SEO & URLS or PERFORMANCE (sometimes there is no harm, sometimes there is, I could not find out at which setting the problem starts, but it seems when revoking a setting from Yes to No)

 

... and it is NOT working as expected restore .htaccess from your local drive ti the root-dir of your shop.

... and working take a local backup of .htaccess as it might happen next time that it is not working for some reason.

 

If you are happy with all your settings in SEO & URLS or PERFORMANCE prevent prestahop from changing it again by using restrictive privileges like 744 or lower on the .htaccess file.

Edited by tommylein (see edit history)
Link to comment
Share on other sites

Hi Tommylein,

 

Thanks for your swift and detailed answer. Our problem appeared after upgrading 1.4.7.3 to 1.5.2 not on a fresh install. I think i will have to look further because our .htacces file is quite big as we use 6 languages.

 

In the 1.4 version i had to put specific directives for my host in specific configuration: RewriteCond %{HTTP_HOST} ^domain.com, RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L].

 

If i come to any conclusion i will post my reply.

 

Thanks again

 

Ben

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

Hello tomilein,

 

I have the same issue. It is all related with the smarty cache option. There is no way to activate the smarty cache without breaking the shop! ()

 

I've tryed your .httcaccess trick but there is no change when I activate / deactivate this option.

 

There is any other solution?? I cannot activate the samarty cache.

 

Please anyone found a solution?

Link to comment
Share on other sites

Hi,

 

After a few times of upgrading I noticed that everything was working correctly untill i installed the new theme with Prestashop theme importer. I upgraded again but now i manually installed the theme and the problem didn't occur anymore... hope that rings a bell? ;-)

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