rocky Posted July 1, 2010 Share Posted July 1, 2010 I noticed on the bug tracker that an important bug was just fixed in PrestaShop's stats module that causes many bad URLs to be crawled by Google. The solution is in the French forum. Link to comment Share on other sites More sharing options...
bartman Posted July 1, 2010 Share Posted July 1, 2010 I was sufferring from these bogus urls, have altered the files and will report back any differencefor info changes made were on a 1.2.5 install and installed fineregardsChris Link to comment Share on other sites More sharing options...
Timpet Posted July 2, 2010 Share Posted July 2, 2010 could someone translate it to us non french? Link to comment Share on other sites More sharing options...
rocky Posted July 3, 2010 Author Share Posted July 3, 2010 To temporarily solve this problem until PrestaShop incorporates a solution, just replace two lines in two different files.Change line 80 of modules/statsdata/statsdata.php from: $token = $blowfish->encrypt($tokenArray['id_connections'].'|'.$tokenArray['id_page'].'|'.$tokenArray['time_start']); to: $token = str_replace('/','STATS',$blowfish->encrypt($tokenArray['id_connections'].'|'.$tokenArray['id_page'].'|'.$tokenArray['time_start'])); and line 19 of statistics.php from: $token = $blowfish->decrypt($_POST['token']); to: $token = $blowfish->decrypt(str_replace('STATS', '/', $_POST['token'])); Link to comment Share on other sites More sharing options...
ukbaz Posted June 3, 2011 Share Posted June 3, 2011 Hi Rocky on 1.3.2 I have // Ajax request sending the time spend on the page $token = sha1((int)$tokenArray['id_connections'].(int)$tokenArray['id_page'].$tokenArray['time_start']._COOKIE_KEY_); $this->_html .= ' In mt statsdata.php. Will the fix work on tis versiona as I get odd Googles too!Thanks Baz Link to comment Share on other sites More sharing options...
rocky Posted June 3, 2011 Author Share Posted June 3, 2011 I'm not sure whether it will work, but you can certainly try: // Ajax request sending the time spend on the page $token = str_replace(/', 'STATS', sha1((int)$tokenArray['id_connections'].(int)$tokenArray['id_page'].$tokenArray['time_start']._COOKIE_KEY_)); $this->_html .= Link to comment Share on other sites More sharing options...
ukbaz Posted June 3, 2011 Share Posted June 3, 2011 Hi Rocky - my statistics.php looks completely different - to example code - have attached, I presume I'd need to make changes in that file too? Bit stuck here :-( statsdata.php statistics.php Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now