If anybody already has experience with Entity Sync, please help if you encountered with similar problems.
(honestly spent a hole day to fight with them).
1) Could manage to work ES only with "Endpoint URL" - http://www.xxxxxxxx.org/entitysync - and NOT https://www.xxxxxxxx.org/entitysync or http://xxxxxxxx.org/entitysync - is it okey?
2) Made a test with creation and syncing of content with minimum fields - "Basic page" - works but no any uid was passed. Author appeared "Anonymous".
3) Tried to test syncing of original content on my site. abt 10 fields: text, taxonomy ref., Long text and summary. Select minimum of them as "Aspects to synchronize".
Settings of rule:
Entity - Node
Entity identifier - node:title
Aspects to synchronize - title, type, few custom fields
"Endpoint URL" - http://www.xxxxxxxx.org/entitysync
Result:
rules working good
Rules debug information:
" Reacting on event After saving new content.
0 ms Reacting on event After saving new content.
39.728 ms Evaluating conditions of rule Creating XXXXX. [edit]
39.746 ms AND evaluated to TRUE.
" Rule Creating XXXXXX fires. [edit]
0 ms Rule Creating XXXXXX fires.
0.733 ms Evaluating the action entitysync_sync. [edit]
492.546 ms Rule Creating XXXXXX has fired.
532.38 ms Finished reacting on event After saving new content.but - no syncing
Syncing of node.XXX[title]=xxxxx failed to http://www.xxxxxxxxxx.org/entitysync with code 403: Forbidden
if I do run Cron - SYNC happend
Syncing of node.XXX[title]=xxxxx to http://www.xxxxxxxxx.org/entitysync succeeded.
Use Drupal 7.28
I disabled all access control modules at destination site
was able to sync create user account (without uid)
Thanks for replies.
Comments
Comment #1
A.Kotov commentedFound cause of 3)
If there "decimal" field have to be synced - it does make the problem.
Comment #2
A.Kotov commentedComment #3
A.Kotov commentedlucky that "float" is working
Could not say exactly if the problem comes from the module or from my sites.
Checked at different 2 sites, but far from being vanila.
Comment #4
A.Kotov commentedthings become more clear.
problem comes only with integer numbers or having a 0 after a decimal point, i.e "32" "1.01" but not "32.1" and "1.1"
somehow it is not encoded/decoded properly
EntitySync.Packet.inc has 2 functions for encoding/decoding using drupal_json_decode and drupal_json_encode
I checked them - looks ok.
may be error comes while saving to database
I have PHP 5.3.27
here related php issues
https://bugs.php.net/bug.php?id=50224
http://sourceforge.net/p/cpaint/patches/6/
"json_encode(array(1.0, 2.3)) encodes to "[1, 2.3]" which fails if the
receiving end does not allow mixed-type arrays."
Comment #5
A.Kotov commenteddefinite bug
Comment #6
A.Kotov commentedpartial solution:
EntitySync.Packet.inc
after $entity_raw = $entity->raw(); // line 63
put this
$entity_raw->field_my_decimal_number_field['und'][0]['value'] = number_format($entity_raw->field_my_decimal_number_field['und'][0]['value'], 6, '.', '');to make proper patch we need make check each field value ,if it is float ('double') and turn it to string or integer.