joop Posted June 5, 2005 Share Posted June 5, 2005 In order to make this by the way excellent contribution to work with the "other" (topic 129041) SEO URL's contribution i had to make some little changes. I hope it's not a problem i post them here and perhaps you can do something with it. In googlesitemap/index.php around line 58: // SEO OTHER BEGIN if ( file_exists(DIR_WS_CLASSES . 'seo.class.php') ){ require_once(DIR_WS_CLASSES . 'seo.class.php'); $seo_urls = new SEO_URL($languages_id); } else if ( file_exists(DIR_WS_CLASSES . 'url_rewrite.php') ){ require_once(DIR_WS_CLASSES . 'url_rewrite.php'); $other_rewrite = true; } // SEO OTHER END In google/sitemap.class.php just below function GenerateProductSitemap(){ // SEO OTHER BEGIN global $other_rewrite; if (!$other_rewrite) { $sql = "SELECT products_id as pID, products_date_added as date_added, products_last_modified as last_mod, products_ordered FROM " . TABLE_PRODUCTS . " WHERE products_status='1' ORDER BY products_ordered DESC"; } else { $sql = "SELECT p.products_id as pID, p.products_date_added as date_added, p.products_last_modified as last_mod, p.products_ordered, pd.products_name, ptc.categories_id FROM " . TABLE_PRODUCTS . " AS p LEFT JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " AS ptc ON ptc.products_id=p.products_id LEFT JOIN " . TABLE_PRODUCTS_DESCRIPTION . " AS pd ON pd.products_id=p.products_id WHERE p.products_status='1' ORDER BY p.products_ordered DESC"; } // SEO OTHER END if ( $products_query = $this->DB->Query($sql) ){ $this->debug['QUERY']['PRODUCTS']['STATUS'] = 'success'; $this->debug['QUERY']['PRODUCTS']['NUM_ROWS'] = $this->DB->NumRows($products_query); $container = array(); $number = 0; $top = 0; while( $result = $this->DB->FetchArray($products_query) ){ $top = max($top, $result['products_ordered']); // SEO OTHER BEGIN if (!$other_rewrite) $location = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $result['pID'], 'NONSSL', false); else $location = tep_href_link(FILENAME_DEFAULT, 'cPath=' . tep_get_product_path($result['pID']) . '/' . $result['products_name'], 'NONSSL', false); // SEO OTHER END $lastmod = tep_not_null($result['last_mod']) ? $result['last_mod'] : $result['date_added']; $changefreq = GOOGLE_SITEMAP_PROD_CHANGE_FREQ; $ratio = $result['products_ordered']/$top; $priority = $ratio < .1 ? .1 : number_format($ratio, 1, '.', ''); Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted June 5, 2005 Share Posted June 5, 2005 Hi, I have installed this contrib and this may sound like a really stoopid question but when you setup the cron job would this be the correct path if my store is in root public_html/googlesitemap/index.php Also how would I know that it has run okay, would I have to wait until midnight?? Mark Quote Lifes a bitch, then you marry one, then you die! Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 Google has visited my page but is giving the following message: Invalid date An invalid date was found. Please validate your Sitemap before resubmitting Could someone tell me wat to change (Dutch site) Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 Misa, I just submitted mine, can you tell how long it took for google to visit your site ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
joop Posted June 5, 2005 Share Posted June 5, 2005 (edited) About 3 hours and i had the same problem with the invalid date ! But he is getting slower and slower. Edited June 5, 2005 by joop Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 4 hours here, what is getting slower Joop? Quote Link to comment Share on other sites More sharing options...
joop Posted June 5, 2005 Share Posted June 5, 2005 Google, I resubmitted my page and the first time it took him 5 mins to download it but the second time is still pending for more than 2 hours. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 But Joop, Did you get the same error with invalid date? and what didi you do about it? Your site is also in the Netherlands?.....or is this not the reason? Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 (edited) for the datestamp, it is expecting either just a date, or a datetimestamp including the offset to GMT time. If you append 'O' (uppercase O not zero) it will add eg +02:00 for servers based in the netherlands ... 'lastmod' => date ("Y-m-d\TH:i:sO", strtotime($lastmod)), I've made this correction, now waiting on google ... Carine Edited June 5, 2005 by bruyndoncx Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 In which file do I have to make the change then? Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 In the catalog/googlesitemap/sitemap.class.php file, for each occurrance of the date format string Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 Ok, I found 2 and have changed it. 'lastmod' => date ("Y-m-d\TH:i:s O", strtotime($lastmod)), Quote Link to comment Share on other sites More sharing options...
joop Posted June 5, 2005 Share Posted June 5, 2005 Thanks Carine, Was just looking for the standard. Misa in sitemap.class.php about 3 or 4 occurences. Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 Ok, I found 2 and have changed it. 'lastmod' => date ("Y-m-d\TH:i:s O", strtotime($lastmod)), <{POST_SNAPBACK}> There are actually 3 occurances, 1 for the main index file, 1 for categories, 1 for products. Also note, that the 'O' should be immediately after 's', no spacing in between. Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
hansmignon Posted June 5, 2005 Share Posted June 5, 2005 Hello Bobby, I always get this error: I uploaded the files and changed the permission to 777. I can see the index.html file.Do you have any idee wy I cannot see the index.php ? Thx, Hans http://www.pricebreaker.be/google/index.php The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -------------------------------------------------------------------------------- Please try the following: Open the www.cartridge-online.be home page, and then look for links to the information you want. Click the Refresh button, or try again later. Click Search to look for information on the Internet. You can also see a list of related sites. HTTP 500 - Internal server error Internet Explorer Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 Ok. Found them on line 372-405-449 'lastmod' => date ("Y-m-d\TH:i:sO", strtotime($lastmod)), Please correct me if it's wrong. Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 Hello Bobby, I always get this error: I uploaded the files and changed the permission to 777. I can see the index.html file.Do you have any idee wy I cannot see the index.php ? Thx, Hans http://www.pricebreaker.be/google/index.php The page cannot be displayed There is a problem with the page you are trying to reach and it cannot be displayed. -------------------------------------------------------------------------------- Please try the following: Open the www.cartridge-online.be home page, and then look for links to the information you want. Click the Refresh button, or try again later. Click Search to look for information on the Internet. You can also see a list of related sites. HTTP 500 - Internal server error Internet Explorer <{POST_SNAPBACK}> Hans, The files should be in the googlesitemap directory. Can you change hte directory name and try again. The directory name is hardcoded in the index.php script in order to call the class file.. Carine Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
compusys Posted June 5, 2005 Share Posted June 5, 2005 I've been scratching my head on this one. Hopefuly somebody can explain what's happening. When I run the script, the output is successful but instead of creating the three files in my root dir named: sitemapproducts.xml sitemapcategories.xml sitemapindex.xml i get three files in my root dir named: googlesitemapsitemapproducts.xml googlesitemapsitemapcategories.xml googlesitemapsitemapindex.xml it appears to be amending the name of the googlesitemap directory to my files. I haven't edited any of the code. The googlesitemap directory is in my root dir, and it runs without error. Just the naming of the files is wrong. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 Just wanted to say I installed this very, very easily. I just followed the instructions and don't seem to have had any of the errors that others are reporting. Fantastic, and easy to follow for beginners instructions as usual Bobby and yet another fantastic contribution. It is getting to the stage where I install anything with your name against it as I know it will be an excellent addition. You are an A1 Geezer as we say in the UK regards Mogsta Quote Link to comment Share on other sites More sharing options...
hansmignon Posted June 5, 2005 Share Posted June 5, 2005 Hello Carine, Changed the directory but it is still the same. checked my log files and I found this: Premature end of script headers: php-script Everytime when I go to: http://www.pricebreaker.be/googlesitemap/index.php So I think there is setting wrong. Has anyone an idee ? Thanks for the help. Hans Quote Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 5, 2005 Share Posted June 5, 2005 can you re-upload the original index.php and sitemap.class.php file to the googlesitemap directory ? to make sure no typo's slipped in ? then next question is, what is your setup (using any of chemo's contributions? ), standard MS2 or a loaded release or anything else peculiar ? PHP4 or 5 ? Quote KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
fatmcgav Posted June 5, 2005 Share Posted June 5, 2005 Hmm,i duno if this is something i've done, or a contrib bug, but when i generate a new sitemap, it appears to be duplicating all the categorie URL's - one in the re-written format and one in the cpath=? format. Like this Just wondering if anybody else was having this problem, or if it was just me :D Cheers Fatmcgav Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 Get with me on instant messenger...I have some code that I want to try that should fix the problem. I want to test it at least once before releasing it...howver, if it works it'll have complete compatibility with the Ultimate SEO URLs :) BTW, I have another release uploaded that fixes the rest of the issues discussed. I'd hold off on upgrading though until we test the SEO URLs compatibility code...it might be worth it. As a side note, upgrading is easy...just overwrite the 2 main files: googlesitemap/index.php and googlesitemap/sitemap.class.php :) Bobby Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 I've uploaded another release that corrects the issue with forming Ultimate SEO URLs. Also, added some nice info on the index.php file when all sitemaps are created successfully. 1) Submission link 2) CRON command 3) Sitemap index link 4) Products sitemap link 5) Categories sitemap link We're getting closer to a stable, mature release for this contribution! I want to thank everyone that is helping test and develop this code! To upgrade simply download the latest release and overwrite the two main files: googlesitemap/index.php googlesitemap/sitemap.class.php Download the latest release Enjoy! Bobby Quote Link to comment Share on other sites More sharing options...
Guest Posted June 5, 2005 Share Posted June 5, 2005 (edited) [DELETED] For some reason the board double posted my last message... Boby Edited June 5, 2005 by Chemo Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.