Hi David, thought I would share this in case others are experiencing the same problem.
According to Google I have lots of missing pages. I see that when I click on the odd featured product on the home page I get "Sorry, this page could not be found". This appears to have only started happening a month or so ago. Not sure what the cause could be, maybe you have an idea ?
Here is an example of the problem pages... (please remove site name)
Search results page:
{link saved}
Product title:
HP ENVY x360 15-bp006na Convertible Laptop with Stylus, Intel® Core™ i5, 8GB RAM, 256GB SSD, NVIDIA GeForce 940MX, 15.6 Full HD Touch Screen, Natural Silver
Product URL:
{link saved}
Thanks for any suggestions.
Hello Graham,
I'll try to recreate this on my test server but what I would suggest if the URL is not being rewritten correctly would be to restrict the URL version of the name (`normalised_name`) to the ASCII range. To do this, edit config.advanced.php of the associated Price Tapestry installation and look for the following code at line 90:
$config_normaliseRegExp = "A-Za-z0-9".chr(0x80)."-".chr(0xFF)." \.";
...and REPLACE with:
$config_normaliseRegExp = "A-Za-z0-9 \.";
Re-import, and product URLs should all then work as expected...
Cheers,
David.
--
PriceTapestry.com
Just before I give that a go, wondering why the problem just started for no apparent reason. Done a comparison of PTO Beta3 and the modded version I'm using and see a couple of changes that I don't recognise.
In pto_common.php I have:
$text = preg_replace('/[^A-Za-z0-9'.$allow.' ]/','',$text);
The default is:
$text = preg_replace('/[^A-Za-z0-9'.$allow.' \.]/','',$text);
Could this have something to do with the problem ?
Hi,
That change is to permit "." which is permitted by the normalise process in standalone Price Tapestry from 16/10A (I will update this in plugin version 3 final) so that shouldn't be the case here...
Cheers,
David.
--
PriceTapestry.com
Attempting to try your suggestion, but I don't have that code in my config.advanced.php !
I'm using PT version 15/01A, that make a difference ?
Thanks
Hi,
That's strange - $config_normaliseRegExp was introduced in 15/01A but if you have this code beginning at line 22 of includes/tapestry.php:
if ($config_charset)
{
$allow = chr(0x80).'-'.chr(0xFF).$allow;
}
...REPLACE with:
if ($config_charset)
{
// $allow = chr(0x80).'-'.chr(0xFF).$allow;
}
...to limit to the ASCII range (and then re-import)...
Cheers,
David.
--
PriceTapestry.com
Hi,
I notice that pages not working contain the UTF-8 © symbol - have a look at this comment - if your WordPress DB_CHARSET is 'utf8mb4' then the steps described there should fix the problem - if not, let me know and I'll check it out further with you...
Cheers,
David.
--
PriceTapestry.com