statestreet Posted December 6, 2011 Share Posted December 6, 2011 Ah, that was it. I added a php.ini to the ProcessWire root with 'allow_url_fopen = true;' and it's working great now. Thanks for the help, and thanks for putting the module on GitHub! Link to comment Share on other sites More sharing options...
Mattias Posted February 17, 2013 Share Posted February 17, 2013 Hi guys! My first post and I have a problem with Data Import Module. I found processwire yesterday and it looks very promising for what I am looking to to do. I keep on running into an error. TemplateFile: Duplicate entry 'mariestads-julebrygd-1008' for key 'name_parent_id' INSERT INTO pages SET parent_id=1008, templates_id=43, name='mariestads-julebrygd', modified_users_id=41, status=1, sort=192,modified=NOW(), created=NOW(), created_users_id=41 When I run data import again it will add around 30 new products then the same error occurs. The xml that i need to read in is fairly large 15.000 products, by running the import a few times i manage to add around 150 products and all the data looks valid and in the right place. The file is in Swedish with ÅÄÖ chars in some values. Here is a screen shot with the error message https://docs.google.com/file/d/0B5OdnzPkcg-gYzU0YjdrR3NFUzg/edit?usp=sharing Here is the XML file: http://www.systembolaget.se/Assortment.aspx?Format=Xml Thank you /mattias Link to comment Share on other sites More sharing options...
apeisa Posted February 17, 2013 Author Share Posted February 17, 2013 Hi Mattias and Welcome to PW. I haven't touched in Data Import module in two years and if I recall correctly I got it working "OK" with JSON but had lot's of issues with XML. As it states on module page (http://modules.processwire.com/modules/process-data-import/) it is a non working module. I am not currently looking to finish that module, so your best bet would be building custom importer (those are fun to do and we are here to help you). Link to comment Share on other sites More sharing options...
Soma Posted February 17, 2013 Share Posted February 17, 2013 Mademyday used this module the other day and got it working. I was also surpized as i didnt knew this module. Link to comment Share on other sites More sharing options...
ryan Posted February 17, 2013 Share Posted February 17, 2013 That error just indicates that there is a name collision when creating a new page. In this case, there is already a page called mariestads-julebrygd and it's trying to insert a new page with the same name (in the same parent). All that would need to be done here is just to make sure that the imported records are unique in whatever is being set to the $page->name field. If there is an ID column of some sort in the XML source data, that would be a good one to use for a $page->name field. Link to comment Share on other sites More sharing options...
apeisa Posted February 17, 2013 Author Share Posted February 17, 2013 If xml is simple enough it should work. If there are attributes etc it will fail.Maybe I should finish this. Thinking of making one version for json and another for xml. Or better yet, making these and csv importer working in harmony (sharing some bits of code like mapping etc). 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now