Tagline

Where are we going and what am I doing in this handbasket?

Two curious things about that *mt2drupal* script: * All the comment counts were zero. * None of the imported articles are indexed by the search module. The first I fixed by taking the output of this and putting it into a CSV file: SELECT COUNT(nid) as count, nid FROM comments GROUP BY nid; In BBEdit I took that file and turned a line like this: 40, 1145 Into this: REPLACE INTO node_comment_statistics SET comment_count=40, nid=1145; Ran the file and all the counts were updated. The code for *mt2drupal* could use a bugfix for that one. (I'm sure, in hindsight, someone could re-write that with sub-selects but I've used MySQL so long I've stop thinking about things like that.) The search bug I'm still hunting down. Ideas? New articles index fine but imported ones do not...
Comment viewing options
Select your preferred way to display the comments and click "Save settings" to activate your changes.
Submitted by joshua (not verified) on February 7, 2005 - 9:03pm.

Check the “moderate” column in the node table. By default, Drupal only indexes nodes that have moderate set to “0” (they can’t be moderated up or down, i.e. voted on). You may have set this up intentionally, or it could be that the import script set all the moderate values to “1”.

(Personally, I use moderation to allow users to move nodes to the front page by voting.)

If you want to index moderated nodes, just edit node.module around line 1521 and remove the “moderate = 0” part…

(This may not be your problem. Smiling But it’s what my problem was a few months ago when search wasn’t indexing my posts.)

Submitted by Adam Knight on February 7, 2005 - 9:08pm.

Nope, that wasn’t it. No non-zero values there. Sad

Submitted by joshua (not verified) on February 8, 2005 - 12:10am.

Hmmm. I’ll bet you’ve done this, but have you tried to wipe out the entire index and have it recreated? Maybe for some reason the imported posts weren’t indexed during the first indexing cron run, and they now will never be (as indexing works on a “posted since last cron run” basis. It has nothing to do with whether a post was indexed already or not. Just on if it was posted recently.)

http://drupal.org/node/4282

Otherwise, I dunno. Sad

Submitted by Adam Knight on February 8, 2005 - 12:53am.

I’d removed the cron timestamp values, but I didn’t know (as noted in the comments there) that it was length-sensitive. Changed that and it re-indexed. Excellent. Thanks. Smiling

Now I have another problem. The import script didn’t give subject-less comments a subject, so I have unclickable results. Yay, another thing to fix.

Oh well, at least the next guy will have the answers.

Submitted by wazdog (joshua) (not verified) on February 8, 2005 - 1:50am.

glad it worked. I got bit by the same problem before. Smiling

As for problem number 2, definitely a bug in the import script. I figure the only way to fix it would be to manually do it via MySQL or write your own script to take the first 30 letters in the comment and make it the subject. That’s what Drupal does by default (see this subject)

Submitted by wazdog (not verified) on February 8, 2005 - 1:55am.

well actually, it’s 29 characters, but hey

Submitted by wazdog (not verified) on February 8, 2005 - 1:56am.

that’s one thing I hate about drupal. I always accidentally post the replies in the main form instead of to the specific comment. arrgghh.

Comment viewing options
Select your preferred way to display the comments and click "Save settings" to activate your changes.
User login