Unable to Synchronize

StefanvdHurk - May 27, 2009 - 08:18
Project:Magento
Version:6.x-1.1-rc1
Component:Code
Category:bug report
Priority:critical
Assigned:ekarelin
Status:fixed
Description

I'm getting this error when I try to synchronize, the only Sync that works is synchronize catalog into taxonomy.

Could not get state name because the remote site gave an error: Invalid api path. (3).
There was some error with getting Rules List from Magento
There was some error with getting Product List from Magento

#1

StefanvdHurk - May 27, 2009 - 08:19
Component:Code» Miscellaneous

#2

mtopolov - May 27, 2009 - 22:00
Component:Miscellaneous» Code

Hi stefan !

Did you installed the magento side modules also ? It is necessary to install our magento modules named Drupal. I've uploaded modules to Magento web site but status is still pending, it seems that it takes time. So I upload magento modules here.

AttachmentSize
Drupal-1.2.tgz 8.24 KB

#3

mtopolov - May 27, 2009 - 22:06
Assigned to:Anonymous» mtopolov
Status:active» needs review

#4

mtopolov - May 29, 2009 - 00:07
Status:needs review» closed

Closed

#5

mtopolov - May 31, 2009 - 17:09

http://www.magentocommerce.com/extension/1020/drupal

Extension now available on magento side !

#6

dargod - June 15, 2009 - 18:26

Hi,

I installed Magento and extension for Dupal. I installed Drupal and your module.

In Magento System -> Configuration -> Magento Extended API I enabled event notification, input the path to Drupal installation followed by /xmlrpc.php, input Drupal admin username and password. In Drupal on Magento API Settings page I input the path to Magento with api/xmlrpc/ , wrote Magento admin username and password.
In Magento I also added the Drupal admin username and password for Web services -> Users and still I can't connect:

# Could not get state name because the remote site gave an error: Access denied. (2).
# Could not get state name because the remote site gave an error: Calling parameters do not match signature (623).

What am I doing wrong?

#7

dargod - June 15, 2009 - 18:27
Status:closed» active

#8

mtopolov - June 15, 2009 - 23:31
Priority:normal» critical

Hum could you post here your watch dog table export ? At least entries generated by Magento module ?

#9

dargod - June 16, 2009 - 13:37

I added cart.js file but the result is the same.
So this is the message:

Drupal function = _magento_api_get_session, Magento function = login, Arguments = i:0;, Response = b:0;

Have I set something special to services module?

#10

dargod - June 16, 2009 - 14:29

As I wrote earlier I added a folder js with cart.js but still have message in dblog:
page not found - sites/all/modules/magento/magento_orders/js/cart.js

I have also log: page not found - sites/all/modules/magento/magento_products/js/show_up.js

I have one test product page in Drupal and clicking on Add to Cart i have message in Firebug:
syntax error
(add_item(,"testproduct","/cart/add...nto/magento_orders/files/progress.gif"))

It seems that there is lack of some files in the module.

Additionaly I got an error in dblog:
file_get_contents(sites/all/modules/magento/magento_products/js/show_up.js) [function.file-get-contents]: failed to open stream: No such file or directory in file .../includes/locale.inc, line 1685.

Hope that helps you.

#11

mtopolov - June 17, 2009 - 09:36

Ok thank you, i'm preparing a new release RC2. There were some problems on our CVS to SVN sync procedure.

#12

mtopolov - June 17, 2009 - 09:41

Ok About the sync. problem. There is a mistake in installation guide. It says : "set up a normal magento user". In fact it is necessary to setup a special 'webservice' user and role. And assign that particular role to that particular user.

It can be done here : System->Web services -> Users
And here : System->Web services -> Roles

Once you've created that special user, you'll need to set up THIS user in Drupal Magento Settings.

Can you say me if this solves your sync problem ?

#13

dargod - June 17, 2009 - 11:25

Trying to establish a new special role in Magento System->Web services -> Roles I get a php error (blank white page). I tried the same on localhost and result was:
Fatal error: Class 'Mage_ApiExtend_Helper_Data' not found in C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php on line 858

My version of Magento is 1.3.2.1

#14

mtopolov - June 17, 2009 - 15:42

"My version of Magento is 1.3.2.1"

This is the problem, as you can notice on magento extension it's compatible with Magento 1.2.* only. There is tricky issue on 1.3 we're working on.
But i'll check again. Also make sure to download the latetest version of extension, we're now on 1.2.4 vesion.

#15

dargod - June 17, 2009 - 17:23

I installed the new version of extension (1.2.4) and this time I was able to establish new role in Magento. In Drupal after setting up the new user in Magento API settings I tried to synchronize and got these errors:
Drupal function = magento_api_catalog_rules_list, Magento function = rule.rulesList, Arguments = i:0;, Response = b:0;
Drupal function = magento_api_config_stores, Magento function = config.stores, Response = b:0;
Drupal function = _magento_api_get_session, Magento function = login, Arguments = i:0;, Response = s:32:"a4386fecdffd98f1c74ca7bcd5e6e91c";
Drupal function = magento_api_config_websites, Magento function = config.websites, Response = b:0;
Drupal function = magento_api_catalog_category_tree, Magento function = category.tree, Arguments = a:2:{i:0;N;i:1;N;}, Response = b:0;
Drupal function = magento_api_catalog_product_list, Magento function = catalog.productsList, Arguments = a:2:{i:0;a:1:{s:7:"type_id";a:1:{s:4:"like";s:6:"simple";}}i:1;b:0;}, Response = b:0;
Of course page not found errors too (js/cart.js).
I seems that the connection was established, still Magento 1.3.2.1

Thanks for help. Keep trying, I can test it at my site.

------------edited:

After some attempts, I cleared the cache in Magento (turned it off) and finally synchronization works. The product from Magento went to Drupal. But there is no link Add to Cart in Drupal product node.

Sorry - I had to change in stock value for the product and now it is visible (without currency code).

#16

mtopolov - June 18, 2009 - 23:52

Ok darog, please could you sum up what problems remains on your side ?

Also feel free to update documentation in any way that could help others ! Thanks :)

#17

dargod - June 19, 2009 - 16:03

I am using Magento 1.3.2.1 and today still have problems in Drupal with connection. Error 623:

* Could not get state name because the remote site gave an error: Calling parameters do not match signature (623).
* There was some error with getting Product List from Magento

Adding a product in Drupal does not add it to Magento. You can add products only in Magento, but there I have problems with synchronization. It seems that you have to install Magento and all the operations do only there (there is no way to administer the stock in Drupal for example). But there in Magento I get errors too, trying to change stock value for product: Server error. Wrong number of method parameters.
In Drupal you can only display products, if you can establish connection.

I see that Magento is not stable, so maybe that is the reason of problems. It is too much to fight with Magento itself and then with Magento and connection with Drupal. So I give up. I think Ubercart or eCommerce are much more useful.

I noticed there is lack of some files in your module: js/cart.js, js/show_up.js, progress.gif... Adding to Cart doesn't work. And that is only the beginning. Sorry. But thanks for your efforts and help.

#18

vinegar - June 23, 2009 - 02:03

I am also having some problems setting up magento modules. Currently using Drupal 6.12 and Magento 1.3.2.1 on LAMP.

in Magento API Settings, if I put the host URL as http://localhost/magento/api/xmlrpc/ and when I try to syn the Catalog I get this error
"Could not get state name because the remote site gave an error: Not Found (404). Is /api/xmlrpc/ a virtual directory because it doesn't exists in my Magento installation.

If I remove the "http://" from the host URL then I don't get any error message when I sync but the Catalog doesn't get ported over from Magento to Drupal.

thanks for the help.

#19

vinegar - June 23, 2009 - 05:20

found a fix by using this URL instead http://localhost/magento/index.php/api/xmlrpc/

#20

vinegar - June 24, 2009 - 06:13

Synchronize Products - warning issue below

* user warning: Unknown column 'field_product_id_value' in 'where clause' query: SELECT nid FROM content_type_product WHERE field_product_id_value = 1 in /var/www/drupal/modules/magento/magento_products/magento_products.module on line 247.
* user warning: Unknown column 'field_product_id_value' in 'field list' query: SELECT field_product_id_value FROM content_type_product ORDER BY field_product_id_value ASC in /var/www/drupal/modules/magento/magento_products/magento_products.module on line 257.

Synchronize Catalog rules

user warning: Unknown column 'field_rule_id_value' in 'field list' query: SELECT field_rule_id_value FROM content_type_rule ORDER BY field_rule_id_value ASC in /var/www/drupal/modules/magento/magento_rules/magento_rules.module on line 100.

the other two works fine without errors.

When I enable Events Notification in Magento...I can't add/edit products and categories.
Server error. Wrong number of method parameters.

#21

mmironenko - June 25, 2009 - 10:14

Try to uncheck "Use keys" setting within Site Building->Services->Settings. "Use sessid" must be checked. This will be added to Installation procedure documentation.

#22

mtopolov - June 25, 2009 - 12:23

As you may see there is a new version of Drupal Modules available. Could you check if that solves your problem ?

#23

vinegar - June 29, 2009 - 05:32
Version:6.x-1.0-rc1» 6.x-1.1-rc1

unchecking "Use keys" setting in Drupal seems to eliminate the error msg "Server error. Wrong number of method parameters." in Magento. However when I update/add product or categories in Magento it doesn't automatically sync with Drupal. Events Notification is On.

Using version 6.x-1.1-rc1
Everytime I hit the Synchonize Products button...a brand new Product content is created eventhough it's the same product. Clicking on this product content get this error:
Could not get state name because the remote site gave an error: Product not exists. (102).

I still get this warning when syn products

user warning: Unknown column 'field_product_id_value' in 'where clause' query: SELECT nid FROM content_type_product WHERE field_product_id_value = 1 in /var/www/drupal/modules/magento/magento_products/magento_products.module on line 247.

user warning: Unknown column 'field_product_id_value' in 'field list' query: SELECT field_product_id_value FROM content_type_product ORDER BY field_product_id_value ASC in /var/www/drupal/modules/magento/magento_products/magento_products.module on line 257.

#24

mmironenko - June 29, 2009 - 12:05

How did you update the module?
Try to uninstall and install new version again. If that solves the problem, this is known bug and it will be closed soon.

#25

vinegar - June 29, 2009 - 23:09

I actually reinstalled Drupal with new database, then install new version of Magento module. Fixed some problem but others are still there. As I stated in my previous post.

#26

nathan.zhu - August 12, 2009 - 11:51

First I got same problem about this.
Could not get state name because the remote site gave an error: Access denied. (2).
I check double times where is wrong with document. Still not clear then step by step to check the magento module code. Don't find more useful information./
It's crazy......
There have some bug in magento_user.module (version: 6.x-1.1-rc2)
line:110, 155, 163
$customerData['firstname'] = $account->name;

there don't have $account parameter, should be change to $acc like below:
$customerData['firstname'] = $acc->name;
after change it, don't have error information.

I back to check magento configuration, hmmm, find problem, after we create new role in there, give new user for this role, you should be give this special role some permission, System->Web services -> Roles -> Role Resources click it to give new permission to this role. I'm first time to use magento, it's so hard let me find this, maybe somebody have same problem with me , hop this can help you guys.

#27

nathan.zhu - August 12, 2009 - 11:44

The problem about how long the new magento account will add to drupal site?
after 1 hour ?
I check the notification configure, there default set 1 hour.
Is there have another way to get short time to synchronize them?

#28

mtopolov - August 12, 2009 - 12:27

Usually on each product creation there is an immediate syncronisation with Drupal. For updates there are also hourly sync (set in settings)
We'll check for provided patch next week.

#29

nathan.zhu - August 13, 2009 - 07:57

In here I still not see any succeed synchronize user from magento to drupal databae,
system->configure->Advanced->system->notification, In here i can see notification setting 1 hour without https.
(Last update Aug 13, 2009 7:53:41 AM) so strange, should be run every hour to update it. why?? where is something wrong for me?

#30

h l - August 13, 2009 - 15:20

i get this message "Could not get state name because the remote site gave an error: (301)"

why?

#31

mtopolov - August 13, 2009 - 15:29

It is currently NOT possible to sync users from Magento -> Drupal. Only Drupal->Magento is possible

#32

mtopolov - August 13, 2009 - 15:30

@h l : what did you try to do to get that error ? Did you checked that API are both set up on Drupal & Magento sides ?

Anyway we need to improve error reporting, not clear enough right now !

#33

h l - August 17, 2009 - 09:00

sorry

i forgot to add the special user in magento...

now , when i insert to drupal a new product (by Site configuration -> Magento Synchronization Settings -> (click on the) Synchronize Products into Nodes. ) , i get this message :

warning: Invalid argument supplied for foreach() in [my_site.com]/sites/all/modules/magento/magento_products/magento_products.module on line 236.

(the function get_object_vars() return the new node as false ?)

#34

mtopolov - August 20, 2009 - 13:59

Currently you CAN NOT create products from Drupal. Only in Magento. That's solves your issue ?

#35

HansR - August 29, 2009 - 13:02

It seems my drupal and magento connect because when I sync, the test product I added in Magento shows up in drupal... But I get lots of errors during sync and when I click on the node title in Drupal, it sais the product doesn't exist.

this is what I get during sync :
warning: Invalid argument supplied for foreach() in /home/allround/domains/allroundpromotion.com/public_html/modules/magento/magento_products/magento_products.module on line 236.
user warning: Unknown column 'field_special_price_from_date_value' in 'field list' query: INSERT INTO content_type_product (vid, nid, field_desc_value, field_desc_format, field_short_desc_value, field_short_desc_format, field_sku_value, field_weight_value, field_price_value, field_actual_price_value, field_special_price_value, field_product_id_value, field_special_price_from_date_value, field_special_price_to_date_value, field_new_from_date_value, field_new_to_date_value, field_status_value, field_visibility_value, field_stock_availability_value, field_discount_price_value, field_tier_price_value, field_image_fid, field_image_list, field_image_data) VALUES (6, 6, 'testing the stuff', NULL, 'testing short desciption ', NULL, 'testingsku1', 2.5, 50, NULL, NULL, 1, NULL, NULL, NULL, NULL, '1', '4', NULL, NULL, NULL, NULL, NULL, NULL) in /home/allround/domains/allroundpromotion.com/public_html/modules/cck/content.module on line 1213.

This is what I get when I click on the node title :

Could not get state name because the remote site gave an error: Product not exists. (102).

Did I miss something ?

#36

BVBAccelerate - October 27, 2009 - 22:15

First off, here is a link to my site I'm experimenting on: http://acceleratewebs.com/pianotest/

Has anyone been able to come up with a solution to this error previously mentioned (When trying to synchronize products with nodes):

# user warning: Unknown column 'field_product_id_value' in 'where clause' query: SELECT nid FROM d_content_type_product WHERE field_product_id_value = 16 in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_products/magento_products.module on line 264.
# warning: Invalid argument supplied for foreach() in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_products/magento_products.module on line 236.

It's iterating over the products and then trying to use values for each product in a foreach, but since there is a field in the select cause that isn't really there in the database the values being put into the foreach aren't correct. There is also this error which occurs only once at the end:

#user warning: Unknown column 'field_product_id_value' in 'field list' query: SELECT field_product_id_value FROM d_content_type_product ORDER BY field_product_id_value ASC in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_products/magento_products.module on line 274.

I checked my drupal database and in my table d_content_type_product (d is my table prefix) there is no field field_product_id_value. Should this be trying to select a different field? I'm not sure why this module would try to choose a field that doesn't exist from a table that it created.

All in all it isn't a total failure because many of my products are properly inserted into the database, as you can see if you went to link. However, when you click on a product to view the details you see "Could not get state name because the remote site gave an error: Product not exists. (102)."

I also am unable to Synchronize Catalog Rules into Nodes. I receive the following error:

# user warning: Unknown column 'field_rule_id_value' in 'where clause' query: SELECT nid FROM d_content_type_rule WHERE field_rule_id_value = 7 in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_rules/magento_rules.module on line 90.

That error repeats over and over with the following error occuring once at the end:

# user warning: Unknown column 'field_rule_id_value' in 'field list' query: SELECT field_rule_id_value FROM d_content_type_rule ORDER BY field_rule_id_value ASC in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_rules/magento_rules.module on line 100.

This seems like a similar problem considering the field names are the same. To me it seems like maybe the drupal extensions have just changed and created a different value in the database and haven't updated that other field in the module code in the select statement. I've looked at the module code and into this for a while now, but figured I'd ask the experts before I tried to go further on my own or just abandon this option all together.

So please, if anyone has any information for me on how to fix this I'm willing to cooperate in any way possible. I think Drupal and Magento integration is a great solution for many users and would love to see it working properly for everyone, and I'd love to help out the community in tandem with getting this to work for the client.

#37

eswary - November 1, 2009 - 17:05

Hi,

I couldn't synchronise my Drupal with magento. ==> I get an ACCESS DENIED : "Could not get state name because the remote site gave an error: Access denied. (2)."

first : i've configured the magento side : with a new role and a new user in webservices. Then i activated in magento event notifications.

Remote XML-RPC host url : my website drupal with http://localhost/Drupal/xmlrpc.php (everything is ok with this url)
Remote XML-RPC username et pass : i've put my user admin from Drupal

Then i configured the Drupal side with :
Remote XML-RPC host url : http://host/magento/api/xmlrpc/
API user /API key (password) : with the user i've created in Magento.

A strange behaviour : the Remote XML-RPC host url does't seem to work out ==> i get a fault code ..
faultCode

631

faultString

Failed to parse request

So i think the url is correct but there's an connexion problem??

Thanks for any help

Sam Ramachandra

#38

mtopolov - November 1, 2009 - 20:38

Eswary, please could you check that

1. You have granted, on Drupal side, access to Services module to anonymous users
2. That on magento side, you've created a "services user" and using this in setup on Drupal side ?

#39

eswary - November 2, 2009 - 08:41

mtopolov,
Thanks you for your help!

yes to the both.

The services are enable for anonymous user, (only "acces" not "administer"),
and in the Magento side : i've created a new role un Webservices "Drupal" and a new user "sam" with a key, assigned this user to the role "Drupal", in spite of this in Drupal i'm getting
Could not get state name because the remote site gave an error: Access denied. (2).

Sam

#40

BVBAccelerate - November 5, 2009 - 20:05

I can't synchronize Products into Nodes. I get this error for each product:

# user warning: Unknown column 'field_product_id_value' in 'where clause' query: SELECT nid FROM d_content_type_product WHERE field_product_id_value = 166 in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_products/magento_products.module on line 264.
# warning: Invalid argument supplied for foreach() in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_products/magento_products.module on line 236.

I can't synchronize Catalog Rules into Nodes. I get this error for each one:

user warning: Unknown column 'field_rule_id_value' in 'where clause' query: SELECT nid FROM d_content_type_rule WHERE field_rule_id_value = 1 in /home/content/j/f/o/jfoley/html/pianotest/modules/magento/magento_rules/magento_rules.module on line 90.

I have excessively tried to look for problems to fix this error, but can't find the columns it's talking about in the database even. Please help me out. I also have posted above with more information detailing my problem.

#41

eswary - November 6, 2009 - 15:24

BVBAccelerate,

Can you put your php.ini? can you what's wrong in my installation (with what i wrote)?

thanks for any help!!

#42

fa4284 - November 8, 2009 - 10:04

I ha ve teh same problem, when i lauch an import of product I have an error user warning: Unknown column 'field_image_fid' in 'field list' query: INSERT INTO content_type_product (vid, nid, field_desc_value, field_desc_format, field_short_desc_value, field_short_desc_format, field_sku_value, field_weight_value, field_price_value, field_actual_price_value, field_special_price_value, field_product_id_value, field_special_price_from_date_value, field_special_price_to_date_value, field_new_from_date_value, field_new_to_date_value, field_status_value, field_visibility_value, field_stock_availability_value, field_discount_price_value, field_tier_price_value, field_image_fid, field_image_list, field_image_data)....
THe when i click on an imported product I have anr error producst doesn't exist....

#43

eswary - November 9, 2009 - 07:43

Finally, i succed to connect Drupal with Mangento, but i get this message : There was some error with getting Rules List from Magento
Does someone met this error message?

Other thing : I don’t really undersand what exactly bring the connexion between Drupal and magento.
I can directly create a product in Drupal and then?? Magento doesn’t synchronise to get content from Drupal Maybe I misunderstand something.
I just want to understand how to use this connexion.

Thanks for any help.

sam

#44

ekarelin - November 9, 2009 - 11:09

Hi eswary,

Magento module was created for using Magento backend for administrating producs/categories from Magento side, not Drupal.
Magento has more usefull backend for that. As Drupal is more handy at his frontend and its much easier to make your fronend looks great with Drupal.
You create all your products at Magento admin part. Feel all data and synchronise all that data with Drupal. At Drupal you make your theme correction (probably something else) and here is it. Your site looks great.
So there is no sense to create products at Drupal. There is Magento for that.

#45

eswary - November 9, 2009 - 12:54

Hi ekarelin,

that's make sense! thanks you for your response.
But maybe we can lose some native magento fonctionnality if we use drupal side?? for example get the 5 best products.

thanks you for your help.

Eswary

#46

ekarelin - November 9, 2009 - 14:43

For best products you can use http://drupal.org/project/fivestar for example.
There is great advantage to use Drupal as frontend. You can use all existing modules (or create your's) for you site.
All we want to do is to get best parts of functionality from Magento & Drupal.
Anyway if we missed something from magento side we will try to implement it in future releases.

#47

eswary - November 10, 2009 - 09:44

I succed to get products,users,rules from Magento. that's great!
Now i've got a problem to checkout...... i put my product in my cart, i give the shipping and billing addresse. then when i want to "ckeckout "i get : "There was some error during getting information from Magento" ...

On the Magento side, i cant order the same product without any error.

Thanks for any help.

#48

eswary - November 10, 2009 - 10:50

In fact Drupal try to connect with magento users :
if ($customer = magento_api_customer_get_customer_id_by_email(array('email' => $user->mail))) $_SESSION['order']['magento_user'] = $customer;
So maybe i just have to create my customer in magento and then connect this user in Drupal afin a synchronisation

#49

ThierryH - November 13, 2009 - 15:27

Hi eswary,

I had a similar problem, which was resolved by adding a product and category directly into Magento. It seems that the no connection error actually referred to there being 0 products to sync with.

Hope that helps.

#50

ThierryH - November 13, 2009 - 15:46

Hi,

I seem to be having the similar problem to BVBAccelerate and fa4284, where I receive errors when trying to sync products and rules. It seems that the Drupal module isn't creating the necessary fields in the 'content_type_product' and 'content_type_rule' database tables. Both tables have just two fields 'vid' and 'nid'.

Errors:
'Unknown column 'field_product_id_value' in 'where clause' query: SELECT nid FROM content_type_product'
'Unknown column 'field_rule_id_value' in 'field list' query: SELECT field_rule_id_value FROM content_type_rule '

I've tried a couple of different Drupal installations (6.14, 6.11) and Magento modules (6.x-1.1-rc2, 6.x-1.1-rc1) but still see the same problem.

Any suggestions much appreciated.

Thanks.

#51

ekarelin - November 16, 2009 - 10:43
Assigned to:mtopolov» ekarelin

Hi ThierryH,
we know about this bug, it is fixed and will be commited asap. For this moment you can uninstall magento_product and magento_rule modules from /admin/build/modules/uninstall and install them once again. It should create right content types for you.
Anyway modules without this bug will be online soon.

#52

mtopolov - November 26, 2009 - 14:41
Status:active» fixed

#53

wengellen - December 1, 2009 - 08:39

Hi ekarelin,

I followed your instruction and was able to get rid of all the error messages.

Thanks a lot.

#54

Ryan Palmer - December 9, 2009 - 22:38

I'm having similar issues, but opened them as a new thread since this one seems a bit out of control.

#655688: Could not get state name because the remote site gave an error: Invalid api path. (3).

 
 

Drupal is a registered trademark of Dries Buytaert.