|
From: Josh S. <sla...@st...> - 2006-08-02 18:29:34
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<font size="-1"><font face="Arial">Hi Shane,<br>
<br>
Thanks for the advice, however:<br>
<br>
</font></font><big><font size="-1"><big><tt>$VAR1 = {<br>
'Submit' => 1,<br>
'Print' => 1,<br>
'Login' => 1,<br>
'FAQ' => 1,<br>
'PollBooth' => 1,<br>
'Search' => 1,<br>
'Validator' => 1,<br>
'Admin' => 1,<br>
'Stats' => 1,<br>
'PubKey' => 1,<br>
'Subscribe' => 1,<br>
'Zoo' => 1,<br>
'Rating' => 1,<br>
'Messages' => 1,<br>
'ResKey' => 1,<br>
<b> 'Blob' => 1,</b><br>
'Events' => 1,<br>
'Hof' => 1,<br>
'Sections' => 1,<br>
'Journal' => 1<br>
};</tt></big></font></big><font size="-1"><font face="Arial"><br>
<br>
I did try to reinstall Blob with the install-plugin script, but no
change. Blob is part of the default install, anyway, and from this
line:<br>
<br>
</font></font> <tt> if ($constants->{plugin}{Blob}) {</tt><br>
<br>
If blob wasn't installed, that would return false and that block
wouldn't run. It's running, but it's failing. Here is the section of
code from $PERLLIB/Slash/DB/MySQL.pm that appears to be failing. The
specific lines that are failing with the errors I mentioned earlier are
in bold with their line number in the right margin. (My apologies to
anyone using ASCII mail)<br>
<br>
<br>
<tt>########################################################<br>
<br>
# This method is used to grandfather in old-style sid's,<br>
# automatically converting them to stoids.<br>
sub getStoidFromSidOrStoid {<br>
my($self, $id) = @_;<br>
<b> return $id if $id =~
/^\d+$/; 9900</b><br>
return $self->getStoidFromSid($id);<br>
}<br>
<br>
# This method does the conversion efficiently. There are three<br>
# likely levels of caching here, to minimize the impact of this<br>
# backwards-compatibility feature as much as possible: a RAM<br>
# cache in this Slash::DB::MySQL object (set to never expire,<br>
# since this data is tiny and never changes); memcached (ditto,<br>
# but just with a very long expiration time); and MySQL's query<br>
# cache (which expires only when the stories table is written,<br>
# hopefully only every few minutes). Only if all those fail<br>
# will it actually put any load on the DB.<br>
sub getStoidFromSid {<br>
my($self, $sid) = @_;<br>
<b> if (my $stoid = $self->{_sid_conversion_cache}{$sid})
{ 9915</b><br>
return $stoid;<br>
}<br>
my($mcd, $mcdkey);<br>
if ($mcd = $self->getMCD()) {<br>
$mcdkey = "$self->{_mcd_keyprefix}:sid:";<br>
if (my $answer = $mcd->get("$mcdkey$sid")) {<br>
$self->{_sid_conversion_cache}{$sid} =
$answer;<br>
return $answer;<br>
}<br>
}<br>
my $sid_q = $self->sqlQuote($sid);<br>
my $stoid = $self->sqlSelect("stoid", "stories",
"sid=$sid_q");<br>
<b> $self->{_sid_conversion_cache}{$sid} =
$stoid; 9928</b><br>
my $exptime = 7 * 86400;<br>
$mcd->set("$mcdkey$sid", $stoid, $exptime) if $mcd;<br>
return $stoid;<br>
}</tt><br>
<br>
It would appear that in the code you pointed out, $sid is being sent
with an uninitialized value, or it's not being passed to this function
-- every line referencing that value is blank. I'm not versed enough
in the intricacies of Slash to be able to figure out why this may be.
One thing I can think of is if there isn't a story id to pass. This is
a fresh install, but there are the two initial stories. Plus, isn't
this link ('New' from the admin bar) supposed to create a new story?
Or am I mistaken in its purpose?<br>
<br>
I'm also getting the same issue when I try to approve a new submission,
once I hit the Preview button. Errors are similar:<br>
<br>
<tt>Use of uninitialized value in join or string at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Slash/DB/MySQL.pm
line 9544.<br>
Use of uninitialized value in substitution (s///) at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Slash/Utility/Data.pm
line 2971.<br>
[Wed Aug 2 18:14:10 2006] [error] Can't call method "getFilesForStory"
on an undefined value at $SLASH_PREFIX/$SLASHSITE/htdocs/admin.pl line
1442.\n<br>
</tt><br>
And about two dozen instances of this Apache::Registry error:<br>
<br>
<tt>Wed Aug 2 18:14:10 2006 _genericGets table_prime='session'
table='sessions' param_table='' values: $VAR1 = [ 'lasttitle', 'uid' ];
row: $VAR1 = { 'uid' => '2', 'lasttitle' => 'Test submission' };
caller_info='Slash::Utility::Display line 1266
Apache::ROOTsitename::admin_2epl line 1387
Apache::ROOTsitename::admin_2epl line 233
Apache::ROOTsitename::admin_2epl line 2291 Apache::Registry line 149
Apache::Registry line 149 main line 1 main line 1'</tt><br>
<br>
Seems to be the same root cause, no value passed to getFilesForStory
via $sid. What is $sid supposed to propagate from?<br>
<br>
Thanks again,<br>
<br>
Josh<br>
<br>
shane wrote:
<blockquote cite="mid...@lo..."
type="cite"><br>
<div>
<div>On Aug 2, 2006, at 4:12 AM, Josh Stedman wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite"><font size="-1"><font face="Arial">[...]<br>
On the "New" link in backslash, which links to admin.pl?op=edit, I'm
getting a 500 error. The errors from the error log appear to be in the
slash MySQL module:<br>
<br>
Use of uninitialized value in pattern match (m//) at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Slash/DB/MySQL.pm
line 9900.<br>
Use of uninitialized value in hash element at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Slash/DB/MySQL.pm
line 9915.<br>
Use of uninitialized value in hash element at
/usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi/Slash/DB/MySQL.pm
line 9928.<br>
[Wed Aug 2 07:52:50 2006] [error] Can't call method "getFilesForStory"
on an undefined value at $SLASH_PREFIX/$SITENAME/htdocs/admin.pl line
1442.\n<br>
[...]</font></font></blockquote>
<br>
</div>
<div>You need to install the Slash::Blob plugin - or verify that it
is already installed.</div>
<div><br class="khtml-block-placeholder">
</div>
<div>perl -MSlash::Test=slash -le 'print Dumper
$constants->{plugin}'</div>
<div><br class="khtml-block-placeholder">
</div>
<div>from the command line will give you a list of what plugins are
installed on your site (if your site's virtual user is different from
'slash' then replace it in that command).</div>
<div><br class="khtml-block-placeholder">
</div>
<div>If you grep admin.pl for 'getFilesForStory':</div>
<div><br class="khtml-block-placeholder">
</div>
<div> if ($constants->{plugin}{Blob}) {</div>
<div> my $blobdb = getObject("Slash::Blob");</div>
<div> my $files = $blobdb->getFilesForStory($sid);</div>
<div> $attached_files = slashDisplay('attached_files',
{ files => $files }, { Return => 1});</div>
<div> }</div>
<div><br class="khtml-block-placeholder">
</div>
<div><br class="khtml-block-placeholder">
</div>
<div><br class="khtml-block-placeholder">
</div>
<div><br class="khtml-block-placeholder">
</div>
<div> Shane</div>
<div><br class="khtml-block-placeholder">
</div>
<br>
<pre wrap=""><hr size="4" width="90%">
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
<a class="moz-txt-link-freetext"
href="http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV">http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV</a></pre>
<pre wrap=""><hr size="4" width="90%">
_______________________________________________
Slashcode-general mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:Sla...@li...">Sla...@li...</a>
<a class="moz-txt-link-freetext"
href="https://lists.sourceforge.net/lists/listinfo/slashcode-general">https://lists.sourceforge.net/lists/listinfo/slashcode-general</a>
</pre>
</blockquote>
</body>
</html>
|