Totally Zenned
- Join Date:
- Apr 2007
- Location:
- Vancouver, Canada
- Posts:
- 1,566
- Plugin Contributions:
- 58
Google Base Feeder Support Thread [OLD]
Judging from this:
GOOGLE_FROOGLE_OUTPUT_FILENAME_products.xml
You haven't patched your database...
Views: 806,409
Totally Zenned
Judging from this:
GOOGLE_FROOGLE_OUTPUT_FILENAME_products.xml
You haven't patched your database...
Zen Follower
numinix:
Judging from this:
GOOGLE_FROOGLE_OUTPUT_FILENAME_products.xml
>
> You haven't patched your database...
I added google froogle sql contents, is there some other sql text i should enter, can you clarifie or expand on what you mean we you say i should patch my database.
this all starter when i loaded woz, have you run into this issue before.
thanks for the help!!!
Totally Zenned
wagnerguy:
I added google froogle sql contents, is there some other sql text i should enter, can you clarifie or expand on what you mean we you say i should patch my database.
this all starter when i loaded woz, have you run into this issue before.
thanks for the help!!!
Do you have the configuration menu?
ADMIN->CONFIGURATION->GOOGLE BASE FEEDER CONFIGURATION
By default the filename would be domain_products.xml if you had properly patched your database.
Zen Follower
numinix:
Without a description of the errors we cannot hope to resolve the issues.
Here is the detailed information from Google on the errors with the feed. Keep in mind, none of these item description have had ANY changes made from when they were working before with the uploaded. It has only been since this upgrade does google have a problem with the feed.
This is the error log they provided
TXT FILE ATTACHED IN ZIP BELOW
Zen Follower
numinix:
Do you have the configuration menu?
ADMIN->CONFIGURATION->GOOGLE BASE FEEDER CONFIGURATION
By default the filename would be domain_products.xml if you had properly patched your database.
How do i correctly patch the database, is it one of the sql folders? or correct the error that was made?
thanks for the reply
New Zenner
HI, I need help. I installed everything okay. Did the configuration. I goto tools > Google Base Feeder
I click on any of the links including
Create Product Feed: Click [HERE]
view your product feed
All I get is "Page not found" and noting is created under "feed" Permission is also set to 777... so don't get it.
Is this not compatible with Zen-cart 1.38 with image handler / Simple SEO ?
New Zenner
Nevermind, Got it.. the main php file was not uploaded!
Totally Zenned
New install on 1.3.8 host is BlueHost
I think I have the configuration correct, google ftp username & passsword are correct and I can use them in Filezilla and upload fine.
It runs for about 45 secconds and I get
Google Base Feeder v.1.7.0 09.019.2008 17:38:59 started 2009/02/14 18:39:26
Feed file - /home/langesho/public_html/KERUSSO/feed/jmkerusso_products.xml
Processing: Feed - Yes, Upload - Yes
Google Base File Complete In 0.607974 Seconds 112 Records
Upload started...
Connection failed: uploads.google.comUpload failed...
I know my db is small now, but it is growing. I have 113 items and it generates 112 records.
JOhn ><>
Totally Zenned
JLA:
Here is the detailed information from Google on the errors with the feed. Keep in mind, none of these item description have had ANY changes made from when they were working before with the uploaded. It has only been since this upgrade does google have a problem with the feed.
This is the error log they provided
TXT FILE ATTACHED IN ZIP BELOW
http://www.jlaenterprises.net/froogleerror.txt In item number 2247 it looks like the character it's balking at is
Â
```: in the description here:
```html
No awkward stops and starts—and none of the echoes and distortion
Remove this character and you should be OK
JOhn ><>
Zen Follower
wagnerguy:
How do i correctly patch the database, is it one of the sql folders? or correct the error that was made?
thanks for the reply
can anyone tell me how to patch my database?
Totally Zenned
wagnerguy:
can anyone tell me how to patch my database?By "Patching" your database they mean to install the SQL required in the instructions.
Open the file googlefroogle.sql in a text editor like Windows notepad.exe
In your ZenCart admin open Tools/Install SQL Patches
Copy the contents of googlefroogle.sql and paste into the box in your ZenCart Admin
Click Send
Zen Follower
Stuff4Toys:
By "Patching" your database they mean to install the SQL required in the instructions.
Open the file googlefroogle.sql in a text editor like Windows notepad.exe
In your ZenCart admin open Tools/Install SQL Patches
Copy the contents of googlefroogle.sql and paste into the box in your ZenCart Admin
Click Send
I have done that and i got this message
1062 Duplicate entry 'GOOGLE_BASE_MAP_PRICING' for key 2. I guess the sql has already been loaded. I cant figure out what the issue is.
Totally Zenned
wagnerguy: did you have to merge any documents? Somehow I remember empty characters at the end screwed things up before... just a thought.
New Zenner
smtseng:
I have to modify the if statment
in file googlefroogle.php Line 181, 267, 272
to:
if (1) {
to make it work.Anyone had the same situation ?
Yes I had the same, thankyou - your fix worked!
Bad news is that I'm in the UK and subsequently found out that the GoogleCheckout Accepted icon appears on Base results only for US sellers. Doh!
New Zenner
Anyone that is receiving data feed errors after upgrading to 1.7.1 please read:
As best I can tell, there was a shift in how special characters are handled in the includes/classes/googlebase.php file. Around line 169 there is a function called "google_base_xml_sanitizer".
I copied over some of the older scripting that did work for me and now my function looks like this:
function google_base_xml_sanitizer($str, $cdata = false) {
$_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array('',' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", " " => "");
$str = html_entity_decode($str);
$str = strtr($str, $_cleaner_array);
$str = preg_replace($_strip_search, $_strip_replace, $str);
$str = strip_tags($str);
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
$str = utf8_encode(htmlentities($str));
$str = str_replace('&', '&', $str);
$str = str_replace(array("®", "©", "™"), array('(r)', '(c)', '(tm)'), $str);
$out = "";
$length = strlen($str);
for ($i = 0; $i < $length; $i++) {
$current = ord($str{$i});
if (($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($out);
$str = str_replace(array("<", ">"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}
It's a little bit of a hack job but it works for me. I hope the author will see this and look into it because I love this addon! :clap:
Remember to make a copy before you make any changes to googlebase.php. And well, if it doesn't work .. I don't know what to tell you since I didn't write the script! :huh:
Note: One thing I noticed is that after making this change, my rss feeds seem to lose their HTML formatting. It's not crucial for me, and I'm not 100% certain that Base even allows it. So I may just be confusing myself here. :blush:
Zen Follower
Greetings...
ZC1.3.8a
Google Feeder 1.7.0a
I got this installed and I think its all right..but..
Out of about 30,000 products in my store, the XML file is only ending up with about 4400 products.
Zen Follower
Stuff4Toys:
In item number 2247 it looks like the character it's balking at is
Â
> ```html
No awkward stops and starts—and none of the echoes and distortion
Remove this character and you should be OK
JOhn ><>
reppy:
Anyone that is receiving data feed errors after upgrading to 1.7.1 please read:
As best I can tell, there was a shift in how special characters are handled in the includes/classes/googlebase.php file. Around line 169 there is a function called "google_base_xml_sanitizer".
I copied over some of the older scripting that did work for me and now my function looks like this:
function google_base_xml_sanitizer($str, $cdata = false) {
$_strip_search = array("![\t ]+$|^[\t ]+!m",'%[\r\n]+%m'); // remove CRs and newlines
$_strip_replace = array('',' ');
$_cleaner_array = array(">" => "> ", "®" => "", "®" => "", "™" => "", "™" => "", "\t" => "", " " => "");
$str = html_entity_decode($str);
$str = strtr($str, $_cleaner_array);
$str = preg_replace($_strip_search, $_strip_replace, $str);
$str = strip_tags($str);
$str = eregi_replace("[^[:alnum:][:space:].,!()'-_/+=?äÂÄöÖüÜß]", "", $str);
$str = utf8_encode(htmlentities($str));
$str = str_replace('&', '&', $str);
$str = str_replace(array("®", "©", "™"), array('(r)', '(c)', '(tm)'), $str);
$out = "";
$length = strlen($str);
for ($i = 0; $i < $length; $i++) {
$current = ord($str{$i});
if (($current == 0x9) || ($current == 0xA) || ($current == 0xD) || (($current >= 0x20) && ($current <= 0xD7FF)) || (($current >= 0xE000) && ($current <= 0xFFFD)) || (($current >= 0x10000) && ($current <= 0x10FFFF))) {
$out .= chr($current);
} else {
$out .= " ";
}
}
$str = trim($out);
$str = str_replace(array("<", ">"), array("<", ">"), $str);
if ($cdata) {
$str = '<![CDATA[' . $str . ']]>';
}
return $str;
}
>
> It's a little bit of a hack job but it works for me. I hope the author will see this and look into it because I love this addon! :clap:
>
> Remember to make a copy before you make any changes to googlebase.php. And well, if it doesn't work .. I don't know what to tell you since I didn't write the script! :huh:
>
> Note: One thing I noticed is that after making this change, my rss feeds seem to lose their HTML formatting. It's not crucial for me, and I'm not 100% certain that Base even allows it. So I may just be confusing myself here. :blush:
Thanks for this info. One of the most direct responses we have seen on here. We are giving it a try and will let you know if it works. In the meantime we'll also respond to the other posters message.
Zen Follower
Stuff4Toys:
In item number 2247 it looks like the character it's balking at is
Â
> ```html
No awkward stops and starts—and none of the echoes and distortion
Remove this character and you should be OK
JOhn ><>
Thank You for the reply. Question - how would you suggest one go about removing this character?
The bigger issue here is this. Prior to this upgrade, the upload worked FINE with NO ERRORS and none of the item descriptions have changed since the upgrade. So it seems the issue now is why did this upgrade all of a sudden cause some of our items to have reported errors with Google base when they didn't before the upgrade?
Thanks
Zen Follower
JLA:
Thanks for this info. One of the most direct responses we have seen on here. We are giving it a try and will let you know if it works. In the meantime we'll also respond to the other posters message.
AH - GREAT SUCCESS. This method did INDEED WORK. All of our items processed WITHOUT ERRORS!!!!
Totally Zenned
JLA:
Thanks for this info. One of the most direct responses we have seen on here. We are giving it a try and will let you know if it works. In the meantime we'll also respond to the other posters message.
The next version will include a revamp, AGAIN, of the sanitization. It is important that this function is optimized as it will be the difference of whether or not websites with more than 10,000 products will timeout while populating the feed.
Simply combining the two functions is overkill, but an optimized solution will be included in the next release.
Fields marked required must be completed.
Tell staff why this post should be reviewed.