Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 2 of 14
Google Base - Expected response code 200, got 400
 
HumanBeing
Jr. Member
 
Total Posts:  21
Joined:  2008-11-19
 

Search the forum for gbase.php which is a manual workaround for Google Base uploading.  It will send your products to a file which you will then have to manually upload to Google Base for processing.  In my case, I also had to replace instances of gbase.php in the product URLs with index.php, but after that, it worked perfectly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
xactrecords
Sr. Member
 
Total Posts:  80
Joined:  2008-09-14
 

I am having this issue Expected response code 200, got 400 now with 1.2.1.1 upgrade.  Annoying.  Back to the gbase.php file for me.

Honestly I dont’ think the magento googlebase app has ever worked correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

Google wants all items to have an id so
Add this code

if ($object->getId ()) {
$this
->_setAttribute('id',$object->getId ());
}
to app/code/core/Mage/GoogleBase/Model/Service/Item.php in the _setUniversalData() function after $entry = $this->getEntry(); line247
 
Magento Community Magento Community
Magento Community
Magento Community
 
HumanBeing
Jr. Member
 
Total Posts:  21
Joined:  2008-11-19
 
Incognito - 25 February 2009 10:02 AM

[...]Add this code[...]

Cool!  I won’t have a chance to test this for a while, but have you submitted this fix to the dev team so that this is merged into the code base?  Otherwise, we’ll all have to maintain it separately.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

?? no.  How do you submit it?  I turned in a bug report when I found out what the problem was, and then added the solution as a comment

 
Magento Community Magento Community
Magento Community
Magento Community
 
HumanBeing
Jr. Member
 
Total Posts:  21
Joined:  2008-11-19
 

I’ve never submitted code to this particular project, but it all depends on how the devs like to receive patches.  In this case, a dev might just implement the solution from the bug report comment since it’s small enough.

Something that should be guaranteed to work is if you check out the 1.2 stable Magento sources (see http://www.magentocommerce.com/svn ) and then apply your change, and submit a patch against the baseline.  The only reference I found to patches in this site’s docs was this ancient post that says to email it: http://www.magentocommerce.com/boards/viewthread/223/ Perhaps the bug reporting software will let you post a patch there instead.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mirzu
Jr. Member
 
Total Posts:  3
Joined:  2008-10-03
 

if ($object->getId ()) {
$this->_setAttribute(’id’,$object->getId ());
}

fixed for me 1.1.8

 
Magento Community Magento Community
Magento Community
Magento Community
 
xactrecords
Sr. Member
 
Total Posts:  80
Joined:  2008-09-14
 

YOU ROCK MAN!  Nice fix.  Pretty sad this was working and newest version broke it.  Glad someone figured it out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

I think google just started forcing you to have an id for products. I am pretty sure the previous magneto versions didn’t have the id in it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 
stylesofny - 08 February 2009 06:08 AM

the problem is definately attribute mapping. make sure your are within the parameters of google base. specs

I am not sure, or at least don’t know how it explains the next: couple days ago I start getting that message (Expected response code 200, got 400) when try to upload to Google API ANY available product, while I did not do any changes in my attributes mapping. I tried products from different attribute sets and still have same problem. Something happened. And the worst thing is I did not change the mapping.
The other issue, I am not sure how synchronization works, I tried once and did not noticed any changes in a Google database, only noticed that my products become available to upload to Google again. I thought it will finish the operation. Also, after I start getting Error 200, I made auto upload change after editing the product, but didn’t notice any changes in Google.
It looks like working with Google API needs a more attention from magento team.

 
Magento Community Magento Community
Magento Community
Magento Community
 
joseph23
Jr. Member
 
Total Posts:  3
Joined:  2009-01-25
 

Thanks mirzu. I’ve changed your code slightly to give Google the SKU as the ID rather than the object ID since there is a chance this could change when migrating servers etc., no?

Here is the modified code:

if ($object->getSku()) {
$this->_setAttribute(’id’,$object->getSku());
}

 
Magento Community Magento Community
Magento Community
Magento Community
 
Incognito
Guru
 
Total Posts:  322
Joined:  2008-08-07
Michigan
 

I guess I was thinking that the users can change the sku and they can’t change the id.  The only way it would be an issue is if you started all over with a new database.  If you move the database to a new server the ids will be the same.

 
Magento Community Magento Community
Magento Community
Magento Community
 
uwas
Jr. Member
 
Total Posts:  2
Joined:  2008-08-22
 

Thanks For the code, it worked for me on the first try. I did get an error message but everything took in google base. Now I just have to wait to see if it published.

Thanks
Perry

 
Magento Community Magento Community
Magento Community
Magento Community
 
kimchi209
Member
 
Total Posts:  67
Joined:  2008-12-22
 

Ok. I too am having this problem.

Googlebase was working fine for me (relatively - since everytime i synced it deleted all but 14 products off top even though it left it in gbase - which means i duplicated products readding i think) until a couple weeks ago.

I was experimenting with how to add certain types of products to the site and decided to make an additional attribute set. When I realized that one wasnt getting added to gbase I created an additional mapping for google base. Ever since I did that I cannot get gbase to work. So I deleted the additional attribute set. Still not working. I (big big mistake) deleted everything off google base and tried again… still didnt work. I deleted the additional attribute set mapping. Stil not working. Error 200/400 constantly throughout. So I don’t understand if the additional attribute set broke the app, why didnt removing it fix it? I checked in the sql db and confirmed the additional attribute set is no longer in the google api base attributes mapping table. One thing I noticed was in the table for eav_attribute_set it has like 15 different versions of the default set. I would love to try deleting 14 of them and seeing if that fixes it, but I am not willing to screw everything up.

On a second note - I have tried gbase.php to little avail. It skips about 400 of my active products, so I am missing a huge portion of the products on my gbase feed. I increased my timeout times on php.ini and that shouldnt be affecting it.

Any thoughts?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jonathan123
Sr. Member
 
Total Posts:  215
Joined:  2008-09-14
 

Code change fixed it for me on 1.2.1

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 14