![]() |
Fastforward, my members didn't like the usenet messages being included into the "view new posts" search, as we have a much slower traffic, so I thought it might be useful option in the CP to include or exclude usenet messages from the search new posts function. Just an idea. I intend on hacking it for the mean time to exlude usenet messages.
|
Quote:
|
Quote:
|
Gilby, I'm still looking at your problem. In the meantime, have a look in the usenet_article table at the messages that are not being inserted and look at the refs column and the ord column. Then do a search in the post table and see if one of the refs matches an inserted post AND the ord is either equal to or 1 more than an inserted post.
Also, did the missing messages originate from usenet or your forum? |
Well I've just tested it on that webdiscuss news server and I managed to get all the messages from that thread with no problems. They didn't all come in in the first run though. This is because it only does one 'insert into forum' batch each time. So although all messages were retrieved and placed into usenet_article during the first run, it took three more runs to insert them correctly in order. The only other explanation is if the references weren't placed in your outgoing messgages correctly. I'll check the code in the newreply.php and newthread.php again.
On another note. I have come across a problem with the control panel if gzip is not enabled or output buffering is not on. You'll get the 'Cant add header' errors. I now see why Jelsoft didn't refresh the control panel each time a change is made. I'll look into fixing that tomorrow. |
Now I am puzzled. :confused: I did a clean install of the forums (imported the original DB that had no posts, etc. into a new DB) and imported the rec.sport.unicycling newsgroup and now I only have 15 messages in the usenet_article table and when I look at it, there are reasons that I see that they were not inserted. Stuff like "Re(2):" or "Re: [Re:" are in the subject and some of those have no refs (so the orphan replies code doesn't associate a ref for it). Earlier today, I had 52 messages in the usenet_article table and most looked like they shouldn't have had the problems. I also downloaded the latest zip of the hack and replaced the newnews.pl script with the one I had (which was version 2.3, but from before the addslashes() fix was put into the code replacements which I didn't think affected the newnews.pl file). Another thing I did was set it for just the one newsgroup without using the multiple servers since you mentioned the bug with that (although I never saw that particular bug, and you deleted it from your post). So, now it appears to work. Thanks for looking into this problem and sorry about trouble.
Anyways, I think a feature that would be nice to help with posts not being inserted would be to have a feature in the control panel where the posts that are still in the usenet_article table are listed and then have an option to choose a thread to put it into. This would help with the posts that have weird subject lines since one unrecognized post makes all the child posts get stuck as well. |
More reports:
1. I got one duplicate message inserted (has same poster and title) but has no body: Here's the empty one: http://www.lowcarber.org/forum/showt...&threadid=1379 Here's the one that's not empty: http://www.lowcarber.org/forum/showt...&threadid=1373 2. CP Stats includes usenet posts, which more than tripled my daily stats. This is just cosmetic suggestion to not include usenet posts in stats or give them their own stats. 3. For some reason the 2.3 newnews.pl doesn no pull news articles, it just displays connected and then "clean disconnect" When I run the 2.1 version it polls articles properly. I currently have the 2.3 installation of the hack, but my cron job uses the 2.1 version of newnews.pl. |
Quote:
Quote:
Quote:
|
Quote:
|
Quote:
|
Quote:
What happens when a forum message is destined for usenet is this:[list=1][*]A dummy msgid is created in the msgid column to avoid primary key violations[*]The message is sent to usenet at the next run. (this is the last thing it does after pulling articles. at this stage there is still only the dummy key available which is meaningless)[*] The next run retrieves the msgid of the posted message and updates the msgid column with the correct message id. (This is is the fisrt thing it does, so theoretically, it should have no problem with the messages it's about to pull)[/list=1] So the bottom line is... it shouldn't be a problem, but there may be some scenario I've overlooked that could cause the msgid not to be updated. The obvious cause is if you change your 'useragent' in the control panel. This is how the script identifies your messages. Once you have set it, you should not change it if you have outstanding messages from usenet. |
Yesterday when I tried the newsgroup again from scratch, I did not have any better success than before, as I had thought. What happened was that I had the days to keep orphaned replies set to 7 days, so it deleted the ones that were older than 7 days. So today, I tried it with a setting that would be longer than any of the dates of the messages that are in the newsgroup and there were 69 that could not be inserted into the forums (and 468 that were put in the forums).
Anyways, looking at the ones that did not get inserted, I had these cases:
So in conclusion, the rec.sport.unicycling newsgroup is pretty messed up as far as the posts being properly threaded. The newsgroup is also an email mailing list so that causes some pretty strange things for referenences (such as no references) and the formatting of the subject line. |
Quote:
|
Quote:
If you leave that clause out permanently, you will get messages out of synch. This will happen more on busy groups that are propogated to many servers. I thought long and hard about the best way to handle it, and this method with the ord seemed to be the method that fit most situations. In addition to the ord column, there is the 'seq' column this is simply incremented and the thread id displayed on this order. The 'ord' method makes sure the 'seq' 'makes sense'. As for the other issues, as you probably realize, there's not much we can do about that I don't think. (Except your suggestion of flagging un-inserted messages for manual insertion). If everybody used a good solid news client we'd be fine :) |
I just noticed that on the usenet forum, the "Next thread" link doesn't show up properly. I'd keep pressing it for next thread, and I'd think I'm at the last thread since it only shows "Last thread" But if I check the thread list, there are a few more to read.
This happens on and off, they sometimes show up till the last thread?!? |
This must simply be a post count problem. My script does nothing to the actual forum display or the way vB handles it. Try updating the threadcounts. I'll have a look at the code and see if there's a problem with incrementing and indexing of the posts in the script.
I've already noticed a small problem with the counting of usenet user posts if you have enabled the 'import user from usenet' option. That will be fixed in the next release. |
Quote:
|
Quote:
|
Talking about threads, my usenet threads count is always 0 on main page since i have installed 2.3. Post count is correct but thread count doesn't progress.
Also on another note.. user group permissions to post. - With usenet forum set to 'Open for new posts?' (No) noone can post including user groups allowed to do so. - With usenet forum set to 'Open for new posts?' (Yes) everyone can post including canpostusenet = 0 groups BUT only canpostusenet = 1 group propagates to usenet. Confusing bit is that some replies get propagated to usenet, and then canpostusenet = 0 replies appear only on the board. In effect to NNTP users my guys appear to be replying to phantom posts in the thread. I went through the whole lot few times, can't spot the bug... |
Quote:
Quote:
|
Updated version - New features & bugfixes
This release adds a few options and fixes some of the bugs discovered over the last few days.
Download version 2.4 for vB 2.0b3 There are upgrade instructions for anyone who has installed v2.3. There are only two places in which to change code and a few SQL statements to run. I'll be around for a few hours if anyone installs it tonight and runs into problems. But it's straightforward enough... trust me :) Both the newnews.pl and the usenet.php need replacing with this new version The latest version of this hack will always be in this first post of the thread. |
Fastworward, help!
A user asked me about some crap messages shown in a non-usenet forum, lots usenet posts that arenet from the one I pull with things like: "This message has been automatically sent by Micromuse's Netcool/NNTP Internet Service Monitor." and some SPAM etc. dated Feb 12, but added today. The forum in question is http://www.lowcarber.org/forum/forum...p?s=&forumid=2 I'm still using 2.3. Is this a new bug, or a known one fixed in 2.4? I only use one usenet group as forum #30 and it is populated correcly, while this stuff shows in forum #2. |
Don't panic! The only way this can happen is if you have a destination forum for one of your usenet groups set to a real forum.
Just look in your usenet groups option in the control panel and find the offending group. If you're getting automated messages it sounds like it's alt.test or another test group. If you're absolutely sure it's not showing on your groups options page then look in the usenet_group table for it. But there is no way this can happen by itself. The script has to be told which forum to place messages in. |
Hmm,
I've deleted alt.test (was it set by default to forum #2)? I might've had run it by mistake before I set up the only usenet group I carry. My usenet server has a huge retention rate, so feb12 messages soesn't surprise me. |
Quote:
But if the messages have just appeared today, the script must still be pulling them from usenet. Was it in the usenet_group table? |
No, my database shows one group only, alt.support.diet.low-carb, and the same in my CP.
I might've just noticed it today when a user reported it, since the retention is hight on y NNTP server, I pulled feb 12 messages in late March, so they appear at the bottom and don't get noticed. That's what comes to mind. |
Hmmm, sorry about that. I think I will leave the alt.test group out of the next release... just to be safe. But there really is no way for the script to place messages in any forum other than that specified in the usenet_group table.
Can you clean up the forum easily? It's easy to identify a post as usenet, but it's not easy to determine which forum it's in because there's no forumid in the post table. If there's not too many it's probably safer to do it by hand rather than a query. Let me know if you need any help. |
Oh it could've been a screw up on my part. Remember my earlier post when I was using the 2.1 script on top the 2.3 version of the hack.
Thanks for the offer of help. There are quite a few of them to do by hand. How can I identify usenet messages. I might be able to do something like "delete all usenet posts where forum id=2" If that what you ment by the difficulty due to not having forum id in post table, I can try this: "delete all usenet posts prior to feb 13"? |
There is a column in both the post table and the thread table called 'isusenetpost'. The threads are easy to delete as there is also a 'foumid' column there. But there is no way of knowing which usenet articles from the post table are from the forum that needs cleaning as there is no forumid column.
The cleanest way may be to purge all usenet posts and re-pull the news. You can opt to keep articles that are usenet, but were posted by your users in the control panel if that is a requirement. |
I have no problem purging all usenet posts and polling them back again. How can I purge them? Just to make sure I got it right:
Delete all threads where is usenetpost=1 Delete all posts where isusentpost=1 Any other queries I need to do? |
You can do it from the control panel in the 'Groups Section'
There is an option at the very top to purge all posts, or you can do it for each group. But if you want to do it by hand you are correct in what you said. 'where isusenetpost=1' |
Oops, that didn't work right. It just deleted the posts from the usenet forum, not from the screwed up one! I'll table by table.
|
Ah.. yeah.. sorry. I should have realized that. It's another safety feature to only delete from forums that are specified in the usenet_group table. As you've deleted it from that table it ignores it.
|
Fastforward, I think I found the explanation to what happened. I grep'd on test and found this:
vB_sql_changes.sql:INSERT INTO usenet_group (newsgroup, forum, lastmsg, server, username, password, enabled, footer) VALUES ( 'alt.test', '2', '0', '', '', '', '1', ''); I'm not sure if this was 2.1 or 2.3, but one of them probably wasn't 9999. Just in case anyone has the same installation. Those funny threads were probably sucked in before I deleted alt.test. Everything's fine now, and I'll install the 2.4 |
The link for downloading 2.4 doesn't work?
|
Quote:
|
Quote:
I have now removed the alt.test group completely. I'll also add a note in the docs to double check the groups options page and make sure the forums specified are really where you want the usenet messages to go before runing the script for the first time. The download link was a good one, but I woke up this morning to find my disk was full. Apparently I no longer have access to /dev/null so all my log files filled up. I guess I'll be on the phone all day to Host Pro :rolleyes: Has anybody installed 2.4 yet? Is it all working OK? |
Quote:
|
With 2.4 i'm actually getting
Parse error: parse error in /usr/local/apache/htdocs/forum/admin/functions.php on line 871 Fatal error: Call to undefined function: vbdate() in /usr/local/apache/htdocs/forum/admin/sessions.php on line 326 in both admin/ and forum It's the $DB_site->query("UPDATE forum SET lastactivethread = LEFT('"..addslashes(htmlspecialchars($threadinfo[title]))."',$lastactivethread_length) WHERE forumid = ".$threadinfo[forumid]); line... |
I wrote a script that let's you insert an archived newsgroup or mailing list into the usenet tables. I wrote it so that I could import all the messages since the newsgroup was created and so that I could feed the new messages in from two sources, the mailing list and the newsgroup. Feeding it in from the two sources, I hope will eliminate my missing posts problem for the ones that don't make it into the newsgroup.
This script will read mail in from a file or from an email alias and then parses it to be included in the database. Then the messages will be inserted with the newnews.pl script provided in the Usenet Gateway hack. This script does not make use of any of the spam/binary filtering or other replacement strings that occur before it's inserted. How to use this script: From the command line, execute the script like: Code:
./mail2forum.pl < filename2messages.txt This script can also be used to insert a message sent to an email address right into the database. To do this, you'll need to create an alias in the sendmail aliases (usually at /etc/aliases) to execute the script. The alias would look like this: Code:
forum: "|/path/to/mail2forum.pl" You'll need to rename the file to have the .pl extension. |
All times are GMT. The time now is 10:11 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|