Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Unhandled exception during import of (admitedly large) wordpress XML export file #256

Closed
jrjones opened this issue Jul 29, 2015 · 3 comments

Comments

@jrjones
Copy link

jrjones commented Jul 29, 2015

When importing a large wordpress XML file, I received a null reference exception (quoted below.) When I get a chance in the next few days I will try to get it running in a debugger, but it's completely reproducible.

C:\pretzel>pretzel import --i=wordpress --f=./jrjblog.xml --s=./_site
starting pretzel...
import - import posts from external source

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
 at Pretzel.Logic.Import.WordpressImport.<>c__DisplayClass6.<Import>b__1(XElement e)
 at System.Linq.Enumerable.WhereSelectEnumerableIterator 2.MoveNext()
 at Pretzel.Logic.Import.WordpressImport.Import()
 at Pretzel.Commands.ImportCommand.Execute(IEnumerable 1 arguments)
 at Pretzel.Program.Run(String[] args, OptionSet defaultSet)
 at Pretzel.Program.Main(String[] args)
@jrjones
Copy link
Author

jrjones commented Jul 29, 2015

Ugh... really? I can't upload the XML file for the repro? Lame, GitHub.

If you want to repro, you can download the XML file from my S3 bucket.

thiagojedi added a commit to thiagojedi/pretzel that referenced this issue Jul 29, 2015
@thiagojedi
Copy link
Contributor

The namespaces' versions were hard coded to wp 1.1. Your xml have an attribute "xmlns:wp" at root with version "1.2". PR #257 will fix it.

@jrjones
Copy link
Author

jrjones commented Jul 29, 2015

That did it, I was able to build and confirm that the fix resolves the issue. Thanks for the ridiculously quick turnaround!

@jrjones jrjones closed this as completed Jul 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants