Barama Posted November 12, 2013 Share Posted November 12, 2013 I installed a third language and updated my database field "link_rewrite" in the table ps_product_lang through a script. I did so with my second language too. With the second language everything worked fine. But this time it did not work. The links appear correct. But when I click on a product-link a blank page appears. What can I do? Link to comment Share on other sites More sharing options...
vekia Posted November 12, 2013 Share Posted November 12, 2013 what kind of script you used? can you show it please? Link to comment Share on other sites More sharing options...
Barama Posted November 13, 2013 Author Share Posted November 13, 2013 (edited) what kind of script you used? can you show it please? <?php $datei = file_get_contents('C:/files/ps_product_lang.txt'); $reihe = explode("\n", $datei); foreach($reihe as $linie) { $inhalt = explode(';', $linie); $titel = str_replace(array('"""', '"'), '', $inhalt[9]); $titel = str_replace("'", "", $titel); $metaTitel = str_replace(' ', '-', $titel); $metaTitel = str_replace(',', '-', $metaTitel); $id = trim(str_replace('"', '', $inhalt[0])); echo "UPDATE ps_product_lang SET meta_title = 'Grossiste Bijoux: $titel', description = '{$inhalt[6]}', description_short = '{$inhalt[6]}' WHERE id_lang = 4 AND id_product = $id;\n"; } I then pasted the echo result into phpmyadmin and executed the mysql commands. That worked and link_rewrite was changed. It is just that when I click a product link a blank page shows. I could go into admin and generate the links manually but I have over 2000 products. That is too time consuming. Edited November 13, 2013 by Barama (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted November 13, 2013 Share Posted November 13, 2013 ok seems like your code looks well. can you please turn on error reporting, will see what exactly doesnt work (you will see error code instead of blank page) Link to comment Share on other sites More sharing options...
Barama Posted November 13, 2013 Author Share Posted November 13, 2013 When I turn on the error messages I get the following warning: Warning: Header may not contain more than a single header, new line detected in /home8/bbr/public_html/pp/classes/Tools.php on line 130 Line 130 is inside the "redirectLink($url)" function. It says header('Location: '.$url); on line 130. Link to comment Share on other sites More sharing options...
vekia Posted November 13, 2013 Share Posted November 13, 2013 it might be related to encoding. can you try with header('Location: '.urlencode($url)); Link to comment Share on other sites More sharing options...
Barama Posted November 13, 2013 Author Share Posted November 13, 2013 I tried but I still get the same error. Link to comment Share on other sites More sharing options...
Barama Posted November 15, 2013 Author Share Posted November 15, 2013 Does anyone have some other ideas? Just as an additional information: the language I try to update is french. My links do not have any special french characters. Link to comment Share on other sites More sharing options...
vekia Posted November 15, 2013 Share Posted November 15, 2013 unfortunately i have no idea what is going on there to say somethnig more i will need an access to store and filesystem, so i can't help hope that someone else from developers know solution for this weirdy bug Link to comment Share on other sites More sharing options...
Recommended Posts