Another nntp issue with 3.0.0 [message #161090] |
Fri, 13 November 2009 19:58 |
jm2morri
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 #161379 is a reply to message #161147] |
Wed, 16 December 2009 23:05 |
jm2morri
Messages: 225 Registered: January 2009 Location: Stratford, Ontario, Canad...
Karma: 0
|
Senior Member |
|
|
jm2morri wrote on Tue, 17 November 2009 12:31I 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&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&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 #161382 is a reply to message #161381] |
Thu, 17 December 2009 17:01 |
jm2morri
Messages: 225 Registered: January 2009 Location: Stratford, Ontario, Canad...
Karma: 0
|
Senior Member |
|
|
naudefj wrote on Thu, 17 December 2009 11:20convertPlural() 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 #168529 is a reply to message #166208] |
Tue, 14 May 2013 19:33 |
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']);
|
|
|