Jump to content

[SOLVED] backend preview button for product giving wrong url


Recommended Posts

Hi guys,
I had changed the Route to products in SEO & URL, by removing the category - {id}-{rewrite}{-:ean13}.html . now I have changed back to default again - {category:/}{id}-{rewrite}{-:ean13}.html

problem now is, when i want to preview my items, it points to the product without the category...

but on the front end, the url shows the category.

post-481781-0-23928800-1370781810_thumb.jpg

Link to comment
Share on other sites

i had just done a manual clearing of the cache

 

To clear PrestaShop 1.5 cached data, delete the content of the following folders:

  • cache/smarty/compile
  • cache/smarty/cache
  • img/ tmp

 

Clear all data in the folders, except index.php

 

it's still the same. :(

Link to comment
Share on other sites

okay, so the problem is somewhere else :/

 

i've got another question

you use prestashop from official installation package? Or maybe you use prestashop from something like softaculous?

And what ps version?

Link to comment
Share on other sites

okay, so the problem is somewhere else :/

 

i've got another question

you use prestashop from official installation package? Or maybe you use prestashop from something like softaculous?

And what ps version?

 

I think is softaculous, but I had upgraded the version to 1.5.4.1 2 weeks after it has launched. The upgrade is from the official installation package.

 

I had tried to disable that product and there is a tab that came out to be "save and preview". I click on that, I could be able to preview the product nicely. But when i click on the preview button at the top, it does not point to the correct url... :(

 

i went through /public_html/classes/Dispatcher.php

it doesn't look incorrect.

 

this is the part for product line 109

 

'product_rule' => array(

'controller' => 'product',

'rule' => '{category:/}{id}-{rewrite}{-:ean13}.html',

'keywords' => array(

'id' => array('regexp' => '[0-9]+', 'param' => 'id_product'),

'rewrite' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'ean13' => array('regexp' => '[0-9\pL]*'),

'category' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'categories' => array('regexp' => '[/_a-zA-Z0-9-\pL]*'),

'reference' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'meta_keywords' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'meta_title' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'manufacturer' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'supplier' => array('regexp' => '[_a-zA-Z0-9-\pL]*'),

'price' => array('regexp' => '[0-9\.,]*'),

'tags' => array('regexp' => '[a-zA-Z0-9-\pL]*'),

),

),

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

i found the file dispatcher.

https://github.com/PrestaShop/PrestaShop/blob/master/classes/Dispatcher.php

 

and I overwrote my current file. nothing has changed. so the dispatcher.php file did not cause this issue... gosh...... what other file could it be linked to?

 

is it possible to reinstall everything without affecting the website?

like upgrading the prestashop.

Link to comment
Share on other sites

  • 6 months later...

Guys any solution for this problem? I have the same one. Preview generates 404. Help.

 

when you click on preview button, url is the same as url when you click on product from category view? (in front office)

can you show differencies between urls?

Link to comment
Share on other sites

  • 2 months later...

can you shoot me the download link? for some reason i cant figure out where to download the file from. that link takes  me to the site but doesn't really let me download the file itself. 

 

https://github.com/PrestaShop/PrestaShop/tree/9f2423c2c5b3409355172d89b7ba16ca5a04f816/controllers/admin

please find AdminProductsController.php and download 

Link to comment
Share on other sites

×
×
  • Create New...