Re: Google Base Feeder Support Thread
I redownloaded 1.61 and compared to 1.60, this time the changes did show up, not sure why they didn't show the first time.
Anyway, I added the line of code to the function just like you indicated:
PHP Code:
function zen_xml_sanitizer ($str) {
$_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 = htmlentities($str);
$str = htmlspecialchars($str);
//$partial_entity_array = array("quot;", "lt;", "gt;", "amp;", "apos;", "nbsp;", "deg;", "plusmn;", "ordm;", "sect;", "up2;", "circ;", "up3;", "uml;", "acute;", "ordf;", "frac12;");
//$full_entity_array = array(""", "<", ">", "&", "'", " ", "deg", "+/-", "", "", "^2", "^", "^3", "", "", "", "1/2");
//$str = str_replace($partial_entity_array, $full_entity_array, $str);
return $str;
}
However, this didn't work. I created the file again and reuploaded and I still get the same error from Google and line 4 still says:
<title>S&A</title>
Any other ideas?
In the meantime, I've manually edited the xml file and changed that line to
<title>S&A</title>
Re: Google Base Feeder Support Thread
What exactly does the 'Compress feed file' setting do? Is it supposed to create .zip/.gz file?
I actually end up with a bigger file if I set this to true.
If this setting is turned on, file size is 20.08MB. If turned off file size is 18.18MB.
Re: Google Base Feeder Support Thread
I keep getting this Connection failed: uploads.google.com . can anyone tell me whats wrong?
Re: Google Base Feeder Support Thread
Quote:
However, this didn't work. I created the file again and reuploaded and I still get the same error from Google and line 4 still says:
<title>S&A</title>
Any other ideas?
In the meantime, I've manually edited the xml file and changed that line to
<title>S&A</title>
Take that line out, it will actually create more bugs than it'll fix. Let's try this instead:
PHP Code:
function zen_xml_sanitizer ($str) {
$_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 = str_replace('&', '&', $str); // changes & to &
$str = htmlentities($str);
$str = str_replace('&amp;', '&', $str); // replaces occurences of &amp; with &
}
Re: Google Base Feeder Support Thread
did you create the ftp account on google base?
(you have to create it, even if you have a google base account already)
Quote:
Originally Posted by
rxalex
I keep getting this Connection failed: uploads.google.com . can anyone tell me whats wrong?
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
numinix
Take that line out, it will actually create more bugs than it'll fix. Let's try this instead:
PHP Code:
function zen_xml_sanitizer ($str) {
$_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 = str_replace('&', '&', $str); // changes & to &
$str = htmlentities($str);
$str = str_replace('&amp;', '&', $str); // replaces occurences of &amp; with &
}
Unfortunately, that didn't work either, still getting this on line 4:
<title>S&A</title>
Also, with a different file feed from another website I get this error from Google:
Error Bad data Line #6
We found a mismatched XML tag. - help
This is what line 6 has for this file:
Code:
<description>Sells fine solid gold jewelry.</description>r-jewelry.com/images/large/gld/r3248_LRG.jpg</g:image_link>
Any ideas on this other one?
Thanks.
Re: Google Base Feeder Support Thread
Could it be possible that your title is too short??? I think the XML editor is displaying it as &. Try opening with a text editor like notepad and see if it really is & or &
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
yellow1912
did you create the ftp account on google base?
(you have to create it, even if you have a google base account already)
Yes I did create the ftp account but get this error :( any idea?
Re: Google Base Feeder Support Thread
The ftp account takes a while to be ready to use. Make sure you can login directly to that ftp server first,
Re: Google Base Feeder Support Thread
Quote:
Originally Posted by
yellow1912
The ftp account takes a while to be ready to use. Make sure you can login directly to that ftp server first,
Thanks I am able to login though but tried again with adding ftp:// in config still not doing it :(
Google Base Feeder v.1.5.3 28.08.2007 10:25 started 2007/09/24 15:44:54
Feed file - /home/fae/public_html/sun/feed/1800_google_base.xml
Processing: Feed - No, Upload - Yes
Upload started...
Connection failed: ftp://uploads.google.com
Warning: ftp_connect() [function.ftp-connect]: php_network_getaddresses: getaddrinfo failed: Name or service not known
Upload failed...