Shadow-Lord Posted December 8, 2011 Share Posted December 8, 2011 In includes\functions\html_output.php if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); } else { $link = str_replace('&', '&', $link); } This is breaking error reporting in some modules. In Sage Pay the error url should be: http://www.example.com/checkout_payment.php?payment_error=sage_pay_server&error=4000 but it is been changed to: http://www.example.com/checkout_payment.php?payment_error=sage_pay_server&error=4000 So no error description is shown. Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted December 8, 2011 Share Posted December 8, 2011 did you try commenting out $link = str_replace('&', '&', $link); :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
Shadow-Lord Posted December 10, 2011 Author Share Posted December 10, 2011 Hi, That could be done, but is there any other way to do this so that it will keep the page Search Engine Friendly. Is there another way to add a variable to a link without using the '&'. Link to comment Share on other sites More sharing options...
♥Monika in Germany Posted December 10, 2011 Share Posted December 10, 2011 commenting out that line will make the page not be search engine friendly anymore? :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ... Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2011 Share Posted December 11, 2011 I have had the same problem with the contribution "Shopping Cart as Tooltip". You get an error "not found on this server" because the url changes from & to & when clicked. I changed the html_output from: $link = str_replace('&', '&', $link); to $link = str_replace('&', '&', $link); This works, but it invalidates the code on the pages. This is the error: & did not start a character reference (& probably should have been escaped as &) On the "Shopping Cart as Tooltip" contribution page someone wrote: That is except i have Ultimate SEO URLs installed and get this message when I click on Buy Now: The requested URL /catalog/microsoft-intellimouse-explorer-p-26 was not found on this server. But Backspace fixes this. So it seems for them Backspace fixed the problem. I just don't know what this refers to. If it does work somehow, it may fix the problem in SagePay too. Anybody have any ideas? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 11, 2011 Share Posted December 11, 2011 Hi, That could be done, but is there any other way to do this so that it will keep the page Search Engine Friendly. Is there another way to add a variable to a link without using the '&'. That option had problems in pre-2.3 shops. I don't know if it still does but, in the least, the url's it generates have never has been considered very good with regards to seo so most shop owners, in my experience, opt for one of the url rewriter contributions. So before you get too many url's indexed, you may want to give a thought to whether you want to switch or not. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted December 11, 2011 Share Posted December 11, 2011 Hi Jack, Is there some way that I can get the "Shopping Cart as Tooltip" contribution working without having to change this: $link = str_replace('&', '&', $link); It is pretty much the same problem as Shadow_lord is having, with the & changing to & in the url. I don't want to change to using a url rewriter. Maybe in .htaccess is there a way to just rewrite the & symbol? Link to comment Share on other sites More sharing options...
Jack_mcs Posted December 11, 2011 Share Posted December 11, 2011 Hi Jack, Is there some way that I can get the "Shopping Cart as Tooltip" contribution working without having to change this: $link = str_replace('&', '&', $link); It is pretty much the same problem as Shadow_lord is having, with the & changing to & in the url. I don't want to change to using a url rewriter. Maybe in .htaccess is there a way to just rewrite the & symbol? Any problem/question regarding a contribution should be asked in that contributions thread since that is where the people that update and use it are likely to see it. I'm not familiar with that contribution so I can't offer any thoughs on it. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Guest Posted December 16, 2011 Share Posted December 16, 2011 Hi Shadow-Lord, You can add the following code to your .htaccess file to rewrite & to & which should solve your problem. RewriteCond %{QUERY_STRING} ^(.*)&(.*)$ RewriteRule ^(.*)$ /$1?%1&%2 [L,R=301] Best regards, Ian Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.