17 posts
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Europe
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
webmandesign says

Hi guys,

I have a “weird” issue here.

Recently I had couple of support calls for demo content of my themes. In both instances the WordPress importer returns many of similar errors:
  • Failed to import post tag
  • Failed to import (yes, this one is plain just like that)
  • Failed to import “XYZ”: Invalid post type

Even I was able to replicate the issue when installing the demo content (and also with other ThemeForest themes I’ve bought) on localhost on my computer. It was working perfectly fine before. The only change I can think of was that I updated my theme demo websites (from where the demo images are being downloaded) to current WordPress 3.5, but I don’t think it should be a problem.

Though, when I try to install the demo content on the same server where my theme demo websites are installed, everything works fine.

This rises several questions for me and I was wondering if anybody can shed a light on them:
  1. Why there are these “invalid post type” errors during the import process? As far as I know, WordPress takes the post types directly from XML file regardless what theme is installed / what post types you are actually using. The not-existing post types should be just saved in database, so they should be imported. Why does WordPress have issues with this? (And BTW, there is no error in actual XML file – I’ve run through it all and as I’ve mentioned, the erroneous imports occurs intermittently while importing the same file.)
  2. During import process WordPress downloads only images and attachments from external server. All other data are being taken from XML file, right?
  3. As of previous question: could WordPress import fail due to bandwidth limitation to my theme demo website?
  4. Can somebody explain how the WordPress import works? How it creates WP data, how it imports images (if it import also all created formats or just the main image that is formated during the import process)?

Thank you in advance for any suggestions/ideas!

Oliver

74 posts e404 Themes
  • Microlancer Beta Tester
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Sold between 100 000 and 250 000 dollars
e404 says

Are you sure you have activated your theme before importing the demo content?

1. WordPress can’t import posts of a non-existing type. In my opinion it’s a good behavior, because otherwise posts would be imported as regular posts (imagine that mess).

2. Yes.

3. No, posts and pages would be imported, only the images import would fail.

17 posts
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Europe
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
webmandesign says

Thank you for reply. I realized I’ve installed demo content from different theme of mine. But those themes use the same post types so it doesn’t matter? Well, anyway I tried now and was able to install demo content fine.

However, I’ve checked the screenshots my customer sent me and he has got the theme installed, active but he still get those errors. I can’t see why…

Also thank you for your answers! I didn’t know about 1) so thanks for the tip and I agree it is good behaviour.

74 posts e404 Themes
  • Microlancer Beta Tester
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Sold between 100 000 and 250 000 dollars
e404 says

Post types can have the same display name, but different “ID” (the first param of the register_post_type() function) – maybe that’s the reason?

17 posts
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Europe
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
webmandesign says

Post types can have the same display name, but different “ID” (the first param of the register_post_type() function) – maybe that’s the reason?

No, not the case. They are the same. That’s why it puzzles me. But anyway, it worked for me now and I’m sure the customer didn’t try to import demo content from my other theme as he only bought the one so I really don’t understand why there are those import errors…

My other thought would be could it be some server settings? I mean maybe the XML file (which is around 700KB) was not imported into WordPress in whole? But wouldn’t improter script throw off some error about invalid XML then?

74 posts e404 Themes
  • Microlancer Beta Tester
  • Elite Author
  • Europe
  • Exclusive Author
  • Has been a member for 3-4 years
  • Referred between 50 and 99 users
  • Bought between 1 and 9 items
  • Sold between 100 000 and 250 000 dollars
e404 says

Personally I don’t think server settings could cause this kind of issue.

88 posts
  • Exclusive Author
  • Has been a member for 1-2 years
mailmilisku says

Thank you for reply. I realized I’ve installed demo content from different theme of mine. But those themes use the same post types so it doesn’t matter? Well, anyway I tried now and was able to install demo content fine.

However, I’ve checked the screenshots my customer sent me and he has got the theme installed, active but he still get those errors. I can’t see why…

Also thank you for your answers! I didn’t know about 1) so thanks for the tip and I agree it is good behaviour.

as I know, custom post is own by the theme. In a short words, custom post can’t apply to other theme

17 posts
  • Referred between 10 and 49 users
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Europe
  • Has been a member for 2-3 years
  • Bought between 50 and 99 items
webmandesign says

Hi mailmilisku,

Thanks for the reply. This shouldn’t be a problem once the custom post has the same ID – basically same everything ;)

As for whether custom post is theme related I don’t agree with that. In my opinion it belongs to plugin, but if we (WordPress theme authors) want to sell… :| That’s for the whole new thread ;)

894 posts
  • Europe
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Most Wanted Bounty Winner
  • Microlancer Beta Tester
  • Grew a moustache for the Envato Movember competition
infuse01 says

Since the release of WP 3.5 the Import Plugin hasn’t changed, so it is actually only compatible up to WP 3.4.2. I’m not sure if somebody else is having issues but I have some.

About 2 months ago I started to work for a relative big label for wp themes. (WP 3.4.2) I’ve setup a “playground” for some themes, so I can play around with them. I had NO Issues at all while I’ve setup about 12 Wordpress, each with a custom theme and the demo content (.xml). Now, I need to do that again for another 12 WP (Themes), but I have issues with each of them. I haven’t moved to another webspace, haven’t changed any settings on my current webspace or anything similar. So I guess it has something to do with the importer plugin itself. Don’t wanna blame it, but I have no idea what else could be the reason. Maybe it is because of the new media manager? And also some other minor parts of the code? Especially regarding post types and taxonomies?

Haven’t found anything for now, but hopefully I’ll find some more details to that soon.

Does anyone else experience problems with the Import?

2 posts
  • Bought between 10 and 49 items
  • Has been a member for 3-4 years
  • Thailand
repoulin says

I just tried and this was the first time I had trouble with the feature. I am not sure what the cause is, but I have done this for other Wordpress prior to version 3, so maybe its the problem.

Tried several tips and still searching for a solution. This is how I found this thread.

by
by
by
by
by
by