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
 
taikahn
Member
 
Total Posts:  35
Joined:  2008-04-07
 
Oldgamer - 14 May 2009 11:30 AM

No need to this modification if you update to version 1.3.1.
Saying this, Google “Synchronize” button still does a mess in a version 1.3.1 also… :(

yup. x2.

 
Magento Community Magento Community
Magento Community
Magento Community
 
EmJaInteractive
Sr. Member
 
Avatar
Total Posts:  121
Joined:  2009-04-29
Charlotte, NC USA
 
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

I added this code to the Item.php and now instead of the 400, 200 error I get this:

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

Any help on this??

 
Magento Community Magento Community
Magento Community
Magento Community
 
EmJaInteractive
Sr. Member
 
Avatar
Total Posts:  121
Joined:  2009-04-29
Charlotte, NC USA
 
JenniferAslan - 14 May 2009 10:01 AM

Hi all, this problem seems to be fixed for me by adding this code (thanks, joseph23):

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

to /app/code/core/Mage/GoogleBase/Model/Service/Item.php, in the _setUniversalData() funcition, right after line 246, which said:

$entry $this->getEntry();

I’m using version 1.2.1.1.

I added the same thing after line 246 and now I still get: Expected response code 200, got 400

I am using 1.1.8, any help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Netmorix
Sr. Member
 
Total Posts:  151
Joined:  2008-01-07
Augsburg
 

I have 1.3.1.1 and get the same error. The above trick with changing the item.php has no effect.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andreas_Berlin
Sr. Member
 
Total Posts:  98
Joined:  2009-05-14
Berlin
 

Any Solution for 1.3 ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melchior5
Member
 
Total Posts:  49
Joined:  2009-03-25
Montréal, Québec
 

It work fine for me for the version 1.3.2.1 and the previous one until I make all the SEO optimizations describe here (except the template): http://yoast.com/articles/magento-seo/#template I also installed those modules: http://www.magentocommerce.com/module/906/canonical-url-s-for-magento and http://www.magentocommerce.com/extension/920

And google base is still half working if the name of my product doesn’t have any space in it.

I really think that PremierWeb is right: http://www.magentocommerce.com/boards/viewreply/113220/

And also maybe it’s something with those options

Then, to get started, enable Server URL rewrites. You will find this setting under System => Configuration => Web => Search Engines Optimization. Another good thing to configure now you are on this screen is “Add store Code to Urls” under “Url Options”. In most cases it is better to set this functionality to “No”.

Any suggestions around this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
freemode
Member
 
Total Posts:  75
Joined:  2008-07-16
 

guys,

my google base worked just fine until google base added the neede atrribute which claims if the product is used or new...now i get the error Expected response code 200, got 400 The item is missing a required attribute.

How can i change this in magento, so there is this attribute (new/used) sent to google base, i am using 1.3.0

 
Magento Community Magento Community
Magento Community
Magento Community
 
OrientProducts.com
Jr. Member
 
Total Posts:  1
Joined:  2009-07-03
 

OK - had the error of:

Expected response code 200, got 400. Type: data. Field: condition. Reason: The item is missing a required attribute.

in Magento 1.3.2.2

The reason this is happening is because Google wants a “condition” of the product (new/used) that Magento doesn’t have.  All of our products are new, so here’s how I fixed it.  This won’t work if you’ve got a mix of new/used products.

On line 303 (Can be anywhere in that function) of app/code/core/Mage/GoogleBase/Model/Service/Item.php

$this->_setAttribute('condition''new');

Hope this helps!

 
Magento Community Magento Community
Magento Community
Magento Community
 
freemode
Member
 
Total Posts:  75
Joined:  2008-07-16
 

hello orientproducts,

thanks for the help, could you please be a little bit more specifice where to put the code,
i put it in the item.php here:

/**
* Set Google Base Item Attribute
*
* @param string $attribute Google Base attribute name
* @param string $value Google Base attribute value
* @param string $type Google Base attribute type
*
* @return Mage_GoogleBase_Model_Service_Item
*/

protected function _setAttribute($attribute, $value, $type = ‘text’)
{

$entry = $this->getEntry();
$gBaseAttribute = $entry->getGbaseAttribute($attribute);
if (isset($gBaseAttribute[0]) && is_object($gBaseAttribute[0])) {
$gBaseAttribute[0]->text = $value;
} else {
$entry->addGbaseAttribute($attribute, $value, $type);
}
return $this;
$this->_setAttribute(’condition’, ‘new’);
}

but i still get the error message, thanks in advance for your help

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hillside General Store
Jr. Member
 
Total Posts:  16
Joined:  2009-06-19
Linden, TN
 

That did not work for me.  I get error:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home6/hillsie0/public_html/app/code/core/Mage/GoogleBase/Model/Service/Item.php on line 295

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melchior5
Member
 
Total Posts:  49
Joined:  2009-03-25
Montréal, Québec
 

In Magento 1.3.2.2 they finally put a complete error message when you got an error.  I get now:
Expected response code 200, got 400. Type: data. Field: image_link. Reason: This entry is not of type URL.

I rename all my picture without a space nor a uppercase and that solve my first problem.

Melchior5 - 29 June 2009 12:16 PM

It work fine for me for the version 1.3.2.1 and the previous one until I make all the SEO optimizations describe here (except the template): http://yoast.com/articles/magento-seo/#template I also installed those modules: http://www.magentocommerce.com/module/906/canonical-url-s-for-magento and http://www.magentocommerce.com/extension/920

And google base is still half working if the name of my product doesn’t have any space in it.

I really think that PremierWeb is right: http://www.magentocommerce.com/boards/viewreply/113220/

And also maybe it’s something with those options

Then, to get started, enable Server URL rewrites. You will find this setting under System => Configuration => Web => Search Engines Optimization. Another good thing to configure now you are on this screen is “Add store Code to Urls” under “Url Options”. In most cases it is better to set this functionality to “No”.

Any suggestions around this?

Then I get this error message:
Expected response code 200, got 400. Type: data. Field: condition. Reason: The item is missing a required attribute.
I simply create a GoogleCondition attribute and put new or used as a Dropdown in the Catalog Input Type for Store field.

Now everything is working fine.  I hope this help

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hillside General Store
Jr. Member
 
Total Posts:  16
Joined:  2009-06-19
Linden, TN
 

Well thought I had it fixed.  I got it to publish 53 items before it gave me this error:

Expected response code 200, got 400. Type: data. Field: description. Reason: Duplicate description

I have a number of product that has the same description with only a college team logo diffrent.

 
Magento Community Magento Community
Magento Community
Magento Community
 
freemode
Member
 
Total Posts:  75
Joined:  2008-07-16
 

@melchior5

i tried it as you described but it is not working, just to verify, if i made something wrong,
i created an attribute with dropdown selection “new” and “used”, now i want to put an configurable product (but just the main product) to google base, but i still get the same error, condition set is “new”.

what did i do wrong?

is there a need for a special title so google recognize the conditon? my tile is GoogleCondition, 2 options “new” and used,
all frontend properties set to no, unique value/values required set to no, scope is store view....PLS HELP

 
Magento Community Magento Community
Magento Community
Magento Community
 
Melchior5
Member
 
Total Posts:  49
Joined:  2009-03-25
Montréal, Québec
 

The Name “GoogleCondition” is not important, you can put potato in the place.

In Catalog/Google Base/Manage Attribute did you Map your potato attribute with the Google Base Attribute Condition?

 
Magento Community Magento Community
Magento Community
Magento Community
 
freemode
Member
 
Total Posts:  75
Joined:  2008-07-16
 

ah ok. now i mapped it in the google attributes,
but i still get this message:

Expected response code 200, got 400 This value must be one of the values stated in the data feed instructions for this attribute.

attached you will see the mapping, i made it for us, germany and uk

whats wrong?

Image Attachments
Bild 8.png
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top