FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » Another nntp issue with 3.0.0
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Another nntp issue with 3.0.0 [message #161090] Fri, 13 November 2009 19:58 Go to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I am getting the following when I try to sync one of my news groups on an nntp server (same one as previous messages).

PHP Fatal error: Call to undefined function convertPlural() in /var/data/fudforum_data/include/theme/default/imsg_edt.inc on line 698


The message gets imported. In fact, it gets imported every time the script is run and then this error message seems to cause it to not keep that information and it will import again.

This newsgroup was from 2.81 and I haven't done anything to it manually since the upgrade.

James.
Re: Another nntp issue with 3.0.0 [message #161094 is a reply to message #161090] Fri, 13 November 2009 21:29 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Can it be reproduced? If so, please prepare a test case and post it here.
Re: Another nntp issue with 3.0.0 [message #161099 is a reply to message #161094] Sat, 14 November 2009 04:58 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I'm not sure it can be reproduced externally. If I run the sync script again I get the same thing and the message is added (again) to the forum.

eagle.support.eng on the same news server as before. There are a lot of messages and I was already up to date. Maybe a fresh import will cause the same problem, you can give it a try.

James.
Re: Another nntp issue with 3.0.0 [message #161147 is a reply to message #161099] Tue, 17 November 2009 17:31 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I simply re-imported the group and it worked OK. So there's a bug there somewhere but re-importing was a workaround for me.

James.
Re: Another nntp issue with 3.0.0 [message #161379 is a reply to message #161147] Wed, 16 December 2009 23:05 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
jm2morri wrote on Tue, 17 November 2009 12:31
I simply re-imported the group and it worked OK. So there's a bug there somewhere but re-importing was a workaround for me.


OK, this happened again on a forum that was imported with 3.0.0. Last time it was with a forum that was imported and used with 2.8.X so I figured the issue was with the importing. But that was not the case.

The exact message is

PHP Fatal error: Call to undefined function convertPlural() in /var/data/fudforum_data/include/theme/default/imsg_edt.inc on line 698.

The contents of that file with line 698 indicated below. So it looks like it can't find the function .convertPlural. Where should it be?

----



if ($obj->attach_cnt && $obj->attach_cache) {
$atch = unserialize($obj->attach_cache);
if (!empty($atch)) {
foreach ($atch as $v) {
$sz = $v[2] / 1024;
$sz = $sz < 1000 ? number_format($sz, 2).'KB' : number_format($sz/1024, 2).'MB';
$iemail_attach .= '<tr>
<td class="vm"><a href="index.php?t=getfile&amp;id='.$v[0].'"><img alt="" src="'.$GLOBALS['WWW_ROOT'].'images/mime/'.$v[4].'" /></a></td>
<td><span class="GenText fb">Attachment:</span> <a href="index.php?t=getfile&amp;id='.$v[0].'">'.$v[1].'</a><br />
***line 698 ***<span class="SmallText">(Size: '.$sz.', Downloaded '.convertPlural($v[3], array(''.$v[3].' time',''.$v[3].' times')).')</span></td></tr>';
}
$iemail_attach = '<p />
<table border="0" cellspacing="0" cellpadding="2">
'.$iemail_attach.'
</table>';
}
}

if ($GLOBALS['FUD_OPT_2'] & 32768 && defined('_rsid')) {
$pfx = str_repeat('/', substr_count(_rsid, '/'));
}

Re: Another nntp issue with 3.0.0 [message #161380 is a reply to message #161379] Thu, 17 December 2009 15:27 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
Does anyone know what convertPlural() is? And where should it be located? I can't find it.

I'm happy to dig in and try to fix this, but I'm not sure where to start.

James.
Re: Another nntp issue with 3.0.0 [message #161381 is a reply to message #161380] Thu, 17 December 2009 16:20 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
convertPlural() is defined in /thm/default/i18n/en/language.inc

Do I understand you right - you get the error, and by rerunning the import it disappears again? If I know how to reproduce the problem I can help you. Currently, I don't even know where to start.

PS: Are you running FUDforum 3.0.0 downloaded from SourceForge.net?
Re: Another nntp issue with 3.0.0 [message #161382 is a reply to message #161381] Thu, 17 December 2009 17:01 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
naudefj wrote on Thu, 17 December 2009 11:20
convertPlural() is defined in /thm/default/i18n/en/language.inc


I have that file. So why would it not be able to find the file? File permissions seem OK.

Quote:

Do I understand you right - you get the error, and by rerunning the import it disappears again? If I know how to reproduce the problem I can help you. Currently, I don't even know where to start.


No, here's what happens. Every time I run the sync script I get the above error. The message gets added to the forum fine but it doesn't remember that it does, so the next time the sync script is run I get the same error and the message is imported again. And I run the sync every 5 minutes so it builds up quickly!

For now, I manually edited the file so that line 698 now looks like

<span class="SmallText">(Size: '.$sz.', Downloaded '.$v[3].' times)</span></td></tr>';


I no longer get the error and it remembers that it imported the message so it doesn't try again. Of course, if I rebuild a theme it's going to be overwritten again.

Quote:

PS: Are you running FUDforum 3.0.0 downloaded from SourceForge.net?


I'm not sure where I got the download. It's was from whatever link was in the announcement. I would hope that the 3.0.0 download would be the same no matter where i got it (assuming a good source).
Re: Another nntp issue with 3.0.0 [message #161383 is a reply to message #161382] Thu, 17 December 2009 17:22 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I have your NNTP server and group names. If you send me the message number I can quickly try myself.
Re: Another nntp issue with 3.0.0 [message #161384 is a reply to message #161383] Thu, 17 December 2009 17:40 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
naudefj wrote on Thu, 17 December 2009 12:22
I have your NNTP server and group names. If you send me the message number I can quickly try myself.


I don't have the log captured, but from the forum itself it says message number 120176. That doesn't seem to match the numbers that the sync report sends out with are in the low thousands.

The title is "Sad list of manufacturer comments on my design". Last time it happened I deleted the old forum and cleared it out and then simply reimported everything and it worked fine. Maybe that was because it reset the number downloaded to a state where it worked ???

So you can try to import it. The forum is eagle.support.eng. My experience is when you do it will work OK. But hopefully not Smile

James.
Re: Another nntp issue with 3.0.0 [message #161385 is a reply to message #161384] Thu, 17 December 2009 17:47 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
But the real issue for me is why isn't that function found? Is there a path setting messed up?
Re: Another nntp issue with 3.0.0 [message #161386 is a reply to message #161385] Thu, 17 December 2009 18:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I know this discussion has been going on for ages, but without a test case, I cannot help you. I really need that message number.
Re: Another nntp issue with 3.0.0 [message #161388 is a reply to message #161386] Thu, 17 December 2009 21:29 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
naudefj wrote on Thu, 17 December 2009 13:32
I know this discussion has been going on for ages, but without a test case, I cannot help you. I really need that message number.


Is there a place I can get it? I can get into the database itself. What field do you want?

James.
Re: Another nntp issue with 3.0.0 [message #161389 is a reply to message #161388] Fri, 18 December 2009 05:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
It's displayed when you load messages:
Importing eagle.support.eng message xxxx


You can also look at the "tracker" value in the control panel when it is stuck.
Re: Another nntp issue with 3.0.0 [message #161390 is a reply to message #161389] Fri, 18 December 2009 14:15 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   Canada
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
naudefj wrote on Fri, 18 December 2009 00:24
It's displayed when you load messages:
Importing eagle.support.eng message xxxx


You can also look at the "tracker" value in the control panel when it is stuck.


Right, but it's not stuck any more. With the hack to the file I mentioned above it got past it.

James.
Re: Another nntp issue with 3.0.0 [message #165499 is a reply to message #161390] Wed, 06 July 2011 12:16 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
jm2morri wrote on Fri, 18 December 2009 09:15
naudefj wrote on Fri, 18 December 2009 00:24
It's displayed when you load messages:
Importing eagle.support.eng message xxxx


You can also look at the "tracker" value in the control panel when it is stuck.


Right, but it's not stuck any more. With the hack to the file I mentioned above it got past it.

James.


I rebuilt my themes and it happened again.

---

Importing eagle.support.ger message 23728PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Notice: Undefined index: charset in /var/data/fudforum_data/include/mime_decode.inc on line 225
PHP Fatal error: Call to undefined function convertPlural() in /var/data/fudforum_data/include/theme/default/imsg_edt.inc on line 714

Re: Another nntp issue with 3.0.0 [message #165505 is a reply to message #165499] Thu, 07 July 2011 03:03 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Is this forum still on FUDforum 3.0.0?
Re: Another nntp issue with 3.0.0 [message #165506 is a reply to message #165505] Thu, 07 July 2011 08:17 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
3.0.2 with mime patch
Re: Another nntp issue with 3.0.0 [message #166208 is a reply to message #165506] Tue, 11 October 2011 10:37 Go to previous messageGo to next message
jm2morri is currently offline  jm2morri   
Messages: 225
Registered: January 2009
Location: Stratford, Ontario, Canad...
Karma: 0
Senior Member
I get the same issue with 3.0.3. It has to do with nntp messages that have attachments. However, it looks like there is some extra code in the nntp.php script that looks to see if the message is already imported and if so skips it and resets the counter. That gets around this problem but still doesn't explain why convertPlural can't be found.
Re: Another nntp issue with 3.0.0 [message #168529 is a reply to message #166208] Tue, 14 May 2013 19:33 Go to previous message
eclipsewebmaster is currently offline  eclipsewebmaster   
Messages: 46
Registered: November 2009
Location: Ottawa, Ontario, Canada
Karma: 0
Member
This fixed it for me:

diff -u ../../fudforumtest/scripts/nntp.php nntp.php
--- ../../fudforumtest/scripts/nntp.php 2013-05-10 13:58:42.000000000 -0400
+++ nntp.php 2013-05-14 15:30:43.000000000 -0400
@@ -98,6 +98,7 @@
fud_use('nntp.inc', true);
fud_use('mime_decode.inc', true);
fud_use('scripts_common.inc', true);
+ require($WWW_ROOT_DISK . fud_theme .'language.inc'); // Initialize theme's language helper functions.
define('_uid', 1);
define('sql_p', $GLOBALS['DBHOST_TBL_PREFIX']);
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: karma issue
Next Topic: Can't set up a number of topics per page higher than 5
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 10:54:18 GMT 2024

Total time taken to generate the page: 0.02571 seconds