Support » Plugin: HTML Import 2 » [Plugin: HTML Import 2] Postname Permalinks Not Working

  • I’m trying to use HTML Import 2 to import 400 static html pages into WP Posts as drafts. The posts imported OK BUT there is something terribly wrong with the permalinks and I can’t figure it out.

    I can edit the posts just fine in the WP admin, but again, if I go to ‘View’ the post… even if I use the shortcode URI, I get a 404… it just redirects to the postname permalink and then throws a 404.

    Also, I checked the .htaccess and it’s the std one you see in the Codex post on Permalinks.

    Here’s what I know.

    1. All the posts and pages I’ve written (not imported) work fine.

    2. All the posts I imported with HTML Import will only work with the default structure (?p=3321)… when I try to use ‘pretty permalinks’ these imported posts throw a 404.

    3. BUT if I edit the permalink of an imported post–for example changing one char—it then WORKS. However if I change it back to what it originally used (which is usually what I want), it again fails.

    So… it seems as though the permalinks are somehow being ‘reserved’.. ie. they’re being used by some draft or trash version of a post I can’t ‘see’?

    I don’t understand where the permalinks are stored in the db otherwise I’d go searching for my theory.

    Any ideas?



Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve had the same problem, it’s been driving me nuts. I’ve ended up importing them as published, then at least the permalinks work properly. Easier to paste the generated redirects into .htaccess myself and bulk change the status of the posts after importing, than edit the redirects by hand… sinceĀ I’m dealing with around 900 pages of HTML(!) Great plugin, really handy, but not without hitches.

    After I wrote this, I found that I could save myself some real time by manipulating the db directly. I’m comfortable doing this, but I caution others to think twice and BACKUP before doing so. I learned (by somewhat painful trial and error) how permalinks and revisions are stored–hence the reason for all my ‘phantom’ permalinks.

    The ‘trick’ (if there is one) is just to realise that if you are getting dupes it’s because every draft/revision/or post of any type might share that same permalink (name). You just have to search by that field and get rid of the dupes… Again, you run the risk of de-normalising your data (creating orphans) if you’re not careful.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: HTML Import 2] Postname Permalinks Not Working’ is closed to new replies.