Imported posts only visible to user1
Did the import a couple of times... all seems to go well except that the imported posts:
1) Do not display as teasers where they should (don't really care much)
2) Posts are only visible to user1
Some things that are a bit unusual about my case:
The db I want to import from is both wordpress and vbulletin. Luckily, the wordpress tables have a prefix. Because the db was so large & the import process kept choking, I decided to dump the wp tables, make a new db out of them and just import that. That works nicely, but maybe the fact that I did it that way has some impact on the problem(s) I've described?
Another detail that might matter: a while back before I knew I needed it for importing, I deleted the story node type. I don't use blog at all. So I just recreated the story content type before the import.
Can't think of what else could be the trouble except some modules I've got that do various things based on node type.
BTW, I checked a few of the posts that are not showing and they are flagged as promoted to front page. When I filter by content type in the content list, they show as "story."
Ideas, anyone?
I've tried it on both importers now... with same result. Using the 2nd one required installing Wpress 2.6 and doing the upgrade script first. But that all went pretty well.
I thought the visibility problem might be due to my using the ACL Mod on my Drupal db. So this time, disabled it first. Didn't make any difference.
Does have something to do with permissions though. If I'm not logged on as user1 and I key in a url to the full node of any of the imported posts, I get "access denied...you are not authorized to access this page."
But anon. users are able to see test content I create... even of the same node type.
Unfortunately, to avoid taking the live site down for a really long time to import first then develop the Drupal site, I've got quite alot built and many mods installed on the Drupal side.
Maybe there's a way to import into a fresh Drupal db (core mods only) then import that into my developed db?
Edit: maybe there's a way to manually edit some fields in the db to fix the permissions problem? But I don't know which fields or tables or what values to put in.
Just reverted to an old backup and discovered that if I create new content in any content type it doesn't show for non user1 either. So this problem is not related to WordpresstoDrupal afterall. Somewhere a while back I must have broken permissions. Lots of backups. Will have to get back to where it worked right and go from there.
All I can suggest is to start afresh. Install a new copy of Drupal 5.x or 6.x, which also entails creating a new MySql database. Create your first user which will be User ID 1 (super user).
Check the permissions section, I can't recall the precise setting name but make sure that anonymous users can view/read posts (I believe that setting is near the bottom of the list). I also believe that by default that setting should be set (switched on).
At this point create some test 'story' or 'page' nodes as User ID 1. Logout of User ID 1 then check.
If everything checks out at this point then run the conversion program.
If you are wanting to convert into an existing Drupal database then you will have to fiddle with your permission settings at the least.
I'm not sure if I've been much help as I'm sure you're aware of the above but others might find it useful.
Well, I have to amend. Not sure what happened before, but here's how I tested and the result I got.
1. Went back to old backup and verified that adding content behaves normally... visible to anon users etc.
2. Did a fresh upgrade of the wp database and ran the 2.5 importer to the working Drupal db
3. Found that imported posts were not visible to any but user1
4. Restored Drupal db to the one in item one above: content(new) behaves normally.
So something is breaking during the import. Also I'm getting alot of ’ and “ and †etc in the imported posts (quotes and some hyphens).
Not sure where to go from here.
Any chance you can send me the Wordpress sql file. I'll see what I can do at my end. With the weird characters popping in, that's something to do with the encoding. When creating the Drupal MySql db, make sure the encoding is set to utf and NOT latin.
To upload the file (convert to zip) simply use the insert/edit link button (just above this text area - when editing - 2nd button) and from there you can upload.
Mystery solved!
As I'm driving home I'm toying with the idea of installing one of those Node Permission type modules (there are several) and then setting the node type to everybody-- then it hits me. When you have ACL installed, you often have to Rebuild Permissions to get them to behave right.
That did it.
admin/content/node-settings/rebuild
As for the junk characters, I believe search and replace will take care of that. It's pretty much just ' " and - as far as I can tell.
Edit: I double checked to make sure my db was utf8 when I made it. Are there any gotchas you know of involving phpmyadmin?
I'll do another run anyway to get latest stuff from the live site so I'll look more closely for character set issues.
I've received your Wordpress sql file and it appears the issue revolves around the Wordpress encoding as I can clearly see the weird characters in the sql file. Importing that file, as is, into a Wordpress database will only copy, as is, those weird characters and following on from that the converter would copy those weird characters as well.
It seems like the weird characters are in place of apostrophes, dashes etc and a quick fix would be a simple find and replace of the sql file. Then import that sql file back into a fresh Wordpress MySql database.
I would recommend checking out some of the following links which explain Wordpress encoding problems in more depth. Actually, prior to re-importing the sql file make the necessary changes as suggested by the links (ie. wp_config file).
Google Search Results - Wordpress Encoding Problem
How to fix the WordPress database’s character-set issue
WordPress and MySQL character encoding
Convert database to UTF-8 (39 posts)
The above links also contain links to further information. When I get around to it I might write up an article surrounding this issue since it's relevant to conversion.
Many thanks. If I'm going to search and replace, though, wouldn't it be just as effective to search and replace after I import? What would be the advantage of fixing the wp db first?
Good point.....
You're right....I got so focused on the Wordpress issue I forgot the point of the whole exercise....
The wordpress plugin looks alot easier than a whole bunch of search and replace steps though. Checking it out.


There is no need to extract your Wordpress tables from your MySql database that also includes other systems. That's the whole point of table prefixes, to clearly distinguish one system from another. Having said that, importing those only Wordpress tables to another database should not be the cause of any problems.
Which version of the importer are you using? I'm suspecting not the current one (1.04 - Wordpress 2.5 to Drupal). If that is the case then I'd recommend upgrading your Wordpress to the the latest version and then convert.
With the latest version of the converter you have more options available as regards to which node types to convert to, comment setting, promotion to front page or not etc.
If my memory serves me right the issue regarding posts only visible to user 1 was a problem for the prior version and subsequently dealt with for the later versions.
Steve
Steve's Stuff
Improve Memory