Posted by Oscar Illada on March 18, 2011 at 8:10pm
5 followers
Jump to:
| Project: | WordPress XML for Feeds |
| Version: | 6.x-1.0-beta1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Issue Summary
Hi, i install the module you send to my mail. I follow the steps like you explain in the module page, but when i select the xml file from wordpress site and press import button, there is no content import, the process initialize but when it finish i get this:
* Parsed items =>
o
... (Array, 0 elements)
o
Krumo version 0.2a
| http://krumo.sourceforge.net
Called from /var/www/minisitios/sites/all/modules/wp_feeds/FeedsWordpressXmlParser.class.inc, line 293
* There is no new content.
can you help me??
Thanks
Comments
#1
Are you using the included WordPress Importer module? Note this is not the WordPress Import module, but has a similar name.
Can you attach the WordPress XML file? If you can not, please open it and look for "
<item>". Tell me how many there are.#2
Hi, i find the problem studying the FeedsWordpressXmlParser.class.inc code, we have the problem in the function parseItem(), for some reason in the if ($this->skipItem()){} its returning true and enter and exit . We thinks it's a problem with our xml, I comment the return and it works. I test with a smaller one to see what was wrong,now i'll try with the original xml. Thanks for the help and for the module.
Oscar Illada
#3
Please update this issue with your progress and post any patches here. The module will be released publicly soon.
#4
The problem was in the line 21 of the FeedsWordpressXmlParser.class.inc define('WP_FEEDS_XMLNS', 'http://wordpress.org/export/1.0/'); and my xml have 'http://wordpress.org/export/1.1/'.
I also have the problem for the term relation with the node. If fix it i'll tell you.
Thanks
#5
Hmm. I wonder how we can solve this properly in the XML-parsing code. I wonder if there are any differences between the document-type definitions? If WordPress.com actually published DTDs, that would be easy to determine...
Great. Thanks! Any more detail you can provide about the problem would be great!
#6
Hi!!! the problem with the taxonomies that i have, was a problem with the language, when the FeedProcessor.inc try to map the taxonomies i got $mapping['source'] with "categorias" in Spanish and "etiquetas", cause i'm from Uruguay, South America ;) and in the feed item i have category, and tags.
Other problem that i have is the path of the node, for example (www.example.com/2011/11/22/title-of-the-post), i try to match the exact url, but i can't. I change in the FeedsWordpressXmlParser.class.inc line 556:
if ($path = wp_feeds_url_path($item['url'])) TO if ($path = wp_feeds_url_path($item['guid'])) , and i add some code to the FeedNodeProcessor.inc line 380 more or less: $node->path= $item['path']; and it works, if you have other way to do this and if you don't understand something let me know. Thankssssssss
#7
Hi Oscar; Thank you for the detail. Can you submit a patch so I can review your changes to better understand the problem? It would also be very useful if you can share your WXR file. If you prefer to do this privately, send me a message via my contact form.
#8
Hi Bevan!! i can't send you the wxr file, its from my work, and i do not have permissions to send this kind of info, but i can tell you that the size of the file is 24Mb and now im getting a problem in the batch, i get this error: An HTTP error 500 occurred. Thanks
#9
I understand and I figured that may be the case. Unfortunately that means I am pretty limited as to how I can help. Patch files are the most useful for me. I realise patch files are difficult to make without having this code in git. I will follow up and see if it can be released next week.
#10
The code is in git now.
#11
I had an issue where tags and categories were not being imported from posts.
The issue there was the wrong domain in parseTags() of FeedsWordpressXmlParser.class.inc.
In my copy the line is 637:
$item['tags'] = $tags['tag'];Changing this to:
$item['tags'] = $tags['post_tag'];made category and tag import work for me.
This is just for the case where you're importing tags that are used in posts.
#12
Please open a new thread for that. Patches welcome, although $tags['tag'] works in some cases, so it needs further investigation.
#13
I have the same problem. My WXR file has 38 tags. I can send you the file if you would like it.
I'm getting 2 errors on the same page after clicking import on /import/wordpress_xml:
Warning: Invalid argument supplied for foreach() in FeedsWordpressXmlParser->createTaxonomyTerms() (line 317 of /data/disk/wwmhosting-admin/static/custom/wp2drupal-pf-6-2-104-v1-3/sites/all/modules/wp_feeds/FeedsWordpressXmlParser.class.inc).followed by
Parsed items =>... (Array, 0 elements)
Krumo version 0.2a | http://krumo.sourceforge.net Called from /data/disk/wwmhosting-admin/static/custom/wp2drupal-pf-6-2-104-v1-3/sites/all/modules/wp_feeds/FeedsWordpressXmlParser.class.inc, line 293
There is no new content.
Note, I am trying to run this on Barracuda Octopus Aegir Drupal Hosting platform. Not that it should matter, but that explains the path to the FeedsWordpressXmlParser.class.inc file.
Thanks for your help in advance!
Steve
P.S. Is there a way to delete the listed files for import after you try an import?
#14
I overcame my 500 error by simply pushing max memory to 512M. However, if you need to import tagged Wordpress entries, please set BOTH categories and tags category to tags. It doesn't seem to work otherwise when you're doing the import.