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

Google Base - Expected response code 200, got 400
 
noobuserr
Jr. Member
 
Total Posts:  11
Joined:  2009-01-18
Ohio
 

OK, so my site works and I can check out with Google check out, but it will not under any circumstances publish my products to Google base! I can add my products to Google base and it shows the Google base ID number, but when I try to publish it asks me to type in the code from the picture, which I do and it tells me that I got it correct. The problem is, is that it does not actually publish the items and if I log in to Google, it shows no items as being published. If i try to synchronize the items, it just deletes everything from the list since it can’t be found. I updated to Flash 10 (ironically enough) and now I get the dreaded red error message “Expected response code 200, got 400 “. It is really annoying so any suggestions welcome. I did some reading and nothing seems to work. My Magento account settings and log in are all correct for Google API.

Thanks
Paul


www.copiacart.com

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

I cannot relate the problem to any software update on my computer, as it stop working on all computers I try. It just stop working some day.
I notice interesting thing now: when I checked my products in Google, I noticed the new field and I don’t know how it appears in there: c_condition. I mapped attribute condition to Google field condition. When API worked fine I saw field condition correctly in a Google items.
Now when I checked Google items I noticed field c_condition which I never made. It has value 1. Correct field “condition” also exist and has correct value.I noticed this mystery c_condition field even in items which have been created by uploading file to Google, not using API. More, recently I checked again and I noticed more that one, even up to 4 the same c_condition fields. It is a mystery how it appears in a Google. On a Google page where it recommends to add additional fields I can see c_condition field in a list. What is going on? I feel that something probably is broken in a Google.

 
Magento Community Magento Community
Magento Community
Magento Community
 
vij
Sr. Member
 
Total Posts:  81
Joined:  2009-02-13
 

after adding this
(if ($object->getId ()) {
$this->_setAttribute(’id’,$object->getId ());
} ) code to item.php
im getting fatal error (Call to a member function getTargetCountry() on a non-object in app/code/core/Mage/GoogleBase/Model/Service/Item.php on line 286)
pls help
thanks in advance

 
Magento Community Magento Community
Magento Community
Magento Community
 
adonkey
Member
 
Total Posts:  67
Joined:  2008-10-28
 
Incognito - 25 February 2009 10:02 AM

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

Thx m8, fixed it for me

I’m running Magento ver. 1.2.1.2 and it still wasn’t working until I added that ^

Have the Dev team been told about this ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
vij
Sr. Member
 
Total Posts:  81
Joined:  2009-02-13
 

hi Incognito thanks for ur help
ur code solved my problem
thanks once again
wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
DrBillNye
Sr. Member
 
Avatar
Total Posts:  96
Joined:  2009-02-07
Boulder, CO
 

adding the code snippet allowed me to add products to the sync table but I still can’t publish, I get the same error.  Anyone else?

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

I get a new error after adding incognito’s code…

Notice: Use of undefined constant �id� - assumed ‘�id�’ in /home/peaktope/public_html/app/code/core/Mage/GoogleBase/Model/Service/Item.php on line 248

any thoughts>?

 
Magento Community Magento Community
Magento Community
Magento Community
 
DrBillNye
Sr. Member
 
Avatar
Total Posts:  96
Joined:  2009-02-07
Boulder, CO
 

kimchi make sure you got the complete syntax of the code.  You might be missing a semi colon or something simple like that (check your previous line too to make sure things are still intact.

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

ALLRIGHT! Just started working again. THANK THE LORD! LOL. I have been fussing over this for about a week. Google Base must have changed their requirements it seems. THANKS SO MUCH!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

After I added code to my test store it started to work: I successfully added and then deleted item from Google.
Then I copied changed file to my production store, and when tried to add item to Google I got the error “Namespace Error”.  :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
PremierWeb
Jr. Member
 
Total Posts:  16
Joined:  2009-02-18
 

Since Google’s response is in API format, the error is actually more detailed than what is displaying in the browser.  View source in your browser and you’ll see the exact error bracketed inside of <errors> tags that will help you troubleshoot product upload errors:

<div id="messages"><ul class="messages"><li class="error-msg"><ul><li>Expected response code 200got 400
<errors>
  <
error type="data" field="image_link" reason="This entry is not of type URL." />
</
errors></li></ul></li></ul></div>

For example, this particular error was caused by an invalid URL for the image_link property.  Since we use an extension to SEO our image names, we detected that there were invalid characters in the image URL.  We made the code changes, cleared our image cache, and then product uploaded fine.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Oldgamer
Sr. Member
 
Avatar
Total Posts:  142
Joined:  2008-09-12
 

Update:
I removed my test sub domain, made changes in a code shown above and it starts working (Google base update).

Probably Magento team will make changes in a next update.

 
Magento Community Magento Community
Magento Community
Magento Community
 
avintel
Sr. Member
 
Total Posts:  147
Joined:  2008-05-15
Southern California
 

incognito’s thing pretty much worked for me.  i can add about 20 products at a time but it takes FOREVER! like worse then data flow if that was possible.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Costa
Member
 
Avatar
Total Posts:  56
Joined:  2007-11-21
Shenzhen China
 

I have edited the code like Incognito suggested.
Now when i try and edit a product in Magento which has been previously uploaded to GBase i get the same error:

Expected response code 200, got 400
Not allowed to modify the g:id of an existing item.

Anyone else is getting this?

Thansks

 
Magento Community Magento Community
Magento Community
Magento Community
 
vianetz
Guru
 
Avatar
Total Posts:  537
Joined:  2008-04-13
Munich, Germany
 

Did you edit the SKU?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top