ranjan1101 / magento-openerp-smile-synchro

Automatically exported from code.google.com/p/magento-openerp-smile-synchro
0 stars 0 forks source link

An error occured : junk after document element: line 2, column 0 #49

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Sync categories
2. Returns An error occured : junk after document element: line 2, column 0 

What is the expected output? What do you see instead?
Expected new categories in magento

An error occured : junk after document element: line 2, column 0 

Then, in magento, when went to admin menu for manage categories:
Fatal error: Call to a member function getId() on a non-object in
/opt/www_data/shop_venyashop_magento/lib/Varien/Data/Tree/Dbp.php on line 315

Maybe corrupted database.

What version of the product are you using? On what operating system?
Latest/Latest

Please provide any additional information below.

Openerp log:
[2009-08-28 00:24:42,521] INFO:Magento Export:Successfully updated category
with OpenERP id 4 and Magento id 19
[2009-08-28 00:24:42,951] INFO:Magento Export:Successfully created category
with OpenERP id 49 and Magento id 48
[2009-08-28 00:24:43,393] INFO:Magento Export:Successfully created category
with OpenERP id 5 and Magento id 49
[2009-08-28 00:24:43,763] INFO:Magento Export:Successfully created category
with OpenERP id 6 and Magento id 50
[2009-08-28 00:24:45,429] INFO:Magento Export:Successfully created category
with OpenERP id 31 and Magento id 51
[2009-08-28 00:24:46,025] INFO:Magento Export:Successfully created category
with OpenERP id 37 and Magento id 52
[2009-08-28 00:24:46,492] INFO:Magento Export:Successfully updated category
with OpenERP id 43 and Magento id 22
[2009-08-28 00:24:46,845] INFO:Magento Export:Successfully updated category
with OpenERP id 1 and Magento id 9
[2009-08-28 00:24:47,296] INFO:Magento Export:Successfully created category
with OpenERP id 7 and Magento id 53
[2009-08-28 00:24:47,664] INFO:Magento Export:Successfully created category
with OpenERP id 9 and Magento id 54
[2009-08-28 00:24:48,144] INFO:Magento Export:Successfully created category
with OpenERP id 10 and Magento id 55
[2009-08-28 00:24:48,529] INFO:Magento Export:Successfully created category
with OpenERP id 11 and Magento id 56
[2009-08-28 00:24:48,889] INFO:Magento Export:Successfully created category
with OpenERP id 12 and Magento id 57
[2009-08-28 00:24:49,314] INFO:Magento Export:Successfully created category
with OpenERP id 13 and Magento id 58
[2009-08-28 00:24:49,675] INFO:Magento Export:Successfully created category
with OpenERP id 14 and Magento id 59
[2009-08-28 00:24:50,111] INFO:Magento Export:Successfully created category
with OpenERP id 15 and Magento id 60
[2009-08-28 00:24:50,482] INFO:Magento Export:Successfully created category
with OpenERP id 16 and Magento id 61
[2009-08-28 00:24:50,834] INFO:Magento Export:Successfully updated category
with OpenERP id 17 and Magento id 20
[2009-08-28 00:24:51,262] INFO:Magento Export:Successfully created category
with OpenERP id 18 and Magento id 62
[2009-08-28 00:24:56,623] INFO:Magento Export:Successfully created category
with OpenERP id 20 and Magento id 63
[2009-08-28 00:24:56,972] INFO:Magento Export:Successfully created category
with OpenERP id 21 and Magento id 64
[2009-08-28 00:24:57,431] INFO:Magento Export:Successfully created category
with OpenERP id 22 and Magento id 65
[2009-08-28 00:24:57,788] INFO:Magento Export:Successfully updated category
with OpenERP id 19 and Magento id 21
[2009-08-28 00:24:58,225] INFO:Magento Export:Successfully created category
with OpenERP id 23 and Magento id 66
[2009-08-28 00:24:58,610] INFO:Magento Export:Successfully created category
with OpenERP id 24 and Magento id 67
[2009-08-28 00:24:58,977] INFO:Magento Export:Successfully created category
with OpenERP id 25 and Magento id 68
[2009-08-28 00:24:59,438] INFO:Magento Export:Successfully created category
with OpenERP id 26 and Magento id 69
[2009-08-28 00:24:59,797] INFO:Magento Export:Successfully created category
with OpenERP id 27 and Magento id 70
[2009-08-28 00:25:00,233] INFO:Magento Export:Successfully created category
with OpenERP id 28 and Magento id 71
[2009-08-28 00:25:00,587] INFO:Magento Export:Successfully created category
with OpenERP id 29 and Magento id 72
[2009-08-28 00:25:00,939] INFO:Magento Export:Successfully created category
with OpenERP id 30 and Magento id 73
[2009-08-28 00:25:01,403] INFO:Magento Export:Successfully created category
with OpenERP id 32 and Magento id 74
[2009-08-28 00:25:01,852] INFO:Magento Export:Successfully created category
with OpenERP id 33 and Magento id 75
[2009-08-28 00:25:02,282] INFO:Magento Export:Successfully created category
with OpenERP id 34 and Magento id 76
[2009-08-28 00:25:02,633] INFO:Magento Export:Successfully updated category
with OpenERP id 35 and Magento id 1
[2009-08-28 00:25:03,004] INFO:Magento Export:Successfully created category
with OpenERP id 36 and Magento id 77
[2009-08-28 00:25:03,446] INFO:Magento Export:Successfully created category
with OpenERP id 38 and Magento id 78
[2009-08-28 00:25:03,810] INFO:Magento Export:Successfully created category
with OpenERP id 39 and Magento id 79
[2009-08-28 00:25:04,224] INFO:Magento Export:Successfully created category
with OpenERP id 40 and Magento id 80
[2009-08-28 00:25:04,572] INFO:Magento Export:Successfully created category
with OpenERP id 41 and Magento id 81
[2009-08-28 00:25:04,956] INFO:Magento Export:Successfully created category
with OpenERP id 42 and Magento id 82

Original issue reported on code.google.com by paco.j.n...@gmail.com on 27 Aug 2009 at 10:29

GoogleCodeExporter commented 9 years ago
This is an High priority i think, because it corrupts database. Apologies for 
putting
it as medium.

Original comment by paco.j.n...@gmail.com on 27 Aug 2009 at 10:31

GoogleCodeExporter commented 9 years ago
In the Wiki FAQ says:

you should log the detailed error message, so change temporarily your xmlrpc.py
library file, in def parse_response(self, file, sock): (close to line 1321), 
add a
print response statement so you get:

while 1:
            if sock:
                response = sock.recv(1024)
            else:
                response = file.read(1024)
                print response

But the file only has around 400 lines.

Original comment by paco.j.n...@gmail.com on 28 Aug 2009 at 10:32

GoogleCodeExporter commented 9 years ago
Reinstalling magento exports well (doing the classic 0.9.9 patches to
magento_export_categories.py). ¿?

Original comment by paco.j.n...@gmail.com on 28 Aug 2009 at 12:52

GoogleCodeExporter commented 9 years ago
OpenERP doesn't give error reinstalling, but in magento, when went to admin 
menu for
manage categories:
Fatal error: Call to a member function getId() on a non-object in
/opt/www_data/shop_venyashop_magento/lib/Varien/Data/Tree/Dbp.php on line 315

Original comment by paco.j.n...@gmail.com on 28 Aug 2009 at 1:07

GoogleCodeExporter commented 9 years ago
Finally, we got WHY (not how to fix):

Looks like when we create new categories in openerp and do the export, something
rewrites the magento category id, and only a few appear as new categories and 
the
rest are treated as ''updated'' (overwrited). It seems to there is an
'autoincremental' problem.

Original comment by paco.j.n...@gmail.com on 28 Aug 2009 at 9:33

GoogleCodeExporter commented 9 years ago
You can't export more than 2 levels of categories
The rest dissapear.

Original comment by paco.j.n...@gmail.com on 31 Aug 2009 at 10:11

GoogleCodeExporter commented 9 years ago
That's happen becouse you delete a category(or product) in OpenERP and then try 
to
sinchronize this categories or products that no exist any more(is suppose to be
automaticaly :s). To workaraound it, just set to empty magento_id in 
product_product
and product_category tables.

Sorry for my english :s

El problema ocurre cuando OpenERP intenta sincronizar un producto/categoría
que ya no existe en Magento(por que fue eliminado sólo en Magento).Una forma 
rápida
de solucionar eso seria: ir directo a la base de datos y dejar vacíos el campo
magento_id en las tablas product_product y product_category.

Original comment by sandersp...@gmail.com on 2 Oct 2009 at 9:52

GoogleCodeExporter commented 9 years ago
Hello this happen to me and delete all the category. Data/Tree/Dbp.php on line 
315.
I hope there is a solution.Thank you

Original comment by italolof...@gmail.com on 3 Nov 2009 at 7:51