|
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>
|
|
From: Larson, T. E. <TEL...@we...> - 2006-08-03 13:38:59
|
Josh Stedman wrote:
> perl -MSlash::Test=3Dslashusr -le 'print getObject("Slash::Blob")'
> Error:main:-e:1:Can't locate MIME/Types.pm in @INC
>=20
> **grumble**
>=20
>=20
> cpan> install MIME::Types
>=20
> perl -MSlash::Test=3Dslashusr -le 'print getObject("Slash::Blob")'
> Slash::Blob=3DHASH(0x806323c)
>=20
> Huzzah!
>=20
> And more importantly, it now works. Thanks very much for the help.=20
> Why MIME::Types wasn't installed.... dunno, not going to concern
> myself with such things. I'll just enjoy the fact that it works now.
Well, it's not listed in the requirements for Slash itself. Maybe it
just got overlooked.
Tim
--=20
Tim Larson
West Corporation, Interactive TeleServices
Eschew obfuscation!
|
|
From: shane <sh...@lo...> - 2006-08-07 16:30:35
|
On Aug 3, 2006, at 9:38 AM, Larson, Timothy E. wrote:
> Josh Stedman wrote:
>> perl -MSlash::Test=slashusr -le 'print getObject("Slash::Blob")'
>> Error:main:-e:1:Can't locate MIME/Types.pm in @INC
>>
>> **grumble**
>>
>>
>> cpan> install MIME::Types
>>
>> perl -MSlash::Test=slashusr -le 'print getObject("Slash::Blob")'
>> Slash::Blob=HASH(0x806323c)
>>
>> Huzzah!
>>
>> And more importantly, it now works. Thanks very much for the help.
>> Why MIME::Types wasn't installed.... dunno, not going to concern
>> myself with such things. I'll just enjoy the fact that it works now.
>
>
> Well, it's not listed in the requirements for Slash itself. Maybe it
> just got overlooked.
Well, the thing of it is the installation of the Slash::Blob plugin
isn't a requirement. So it's optional, hence it shouldn't necessarily
be listed in the requirements for Slash itself.
From themes/slashcode/THEME
plugin=Admin
plugin=FAQ
plugin=Journal
plugin=Login
plugin=Hof
plugin=Messages
plugin=PollBooth
plugin=Print
plugin=PubKey
plugin=ResKey
plugin=Search
plugin=Submit
plugin=Stats
plugin=Zoo
I still think Mime::Types should be added to the Bundle::Slash, if it
isn't already. Just to make things easier on everyone. But that's
just my $.02.
Shane
--
My slashcode stuff: http://slash.lottadot.com/
Slashcode faq: http://slash.lottadot.com/slash-faq
How to ask a question: http://www.catb.org/~esr/faqs/smart-
questions.html#before
|
|
From: Jamie M. <ja...@mc...> - 2006-08-02 20:00:36
|
The "use of uninitialized value" is just a warning. Those won't
cause 500 errors, and in most cases aren't worth worrying about.
(_We_ worry about them because they usually indicate trouble spots
in our code to look over, but they're usually not a problem for
other sites that are just running our code.)
Likewise, the "_genericGets" is a debugging print that seems to
have survived through more releases than it should. Ignore it.
Here's the actual error:
> [Wed Aug=C2=A0 2 18:14:10 2006] [error] Can't call method "getFilesForSto=
ry" on an undefined value=20
> at $SLASH_PREFIX/$SLASHSITE/htdocs/admin.pl line 1442.\n
That code reads (I'm assuming -- the line number on my checkout is
a little off):
if ($constants->{plugin}{Blob}) {
my $blobdb =3D getObject("Slash::Blob");
my $files =3D $blobdb->getFilesForStory($sid);
The problem is that the Blob plugin constant is set, which
actually just means there's a line in the site_info table with
name=3D'plugin' and value=3D'Blob'. That's supposed to (and usually
does) indicate that Blob is installed. But
getObject("Slash::Blob")
is returning undef. This could be for a number of reasons. Try
these tests. You should see something like what I see on my test
system:
jamie@daisy:~/slash.cvs$ perl -MSlash::Test=3Dslash -le 'print getObject("S=
lash::Blob")'
Slash::Blob=3DHASH(0x96c4f28)
jamie@daisy:~/slash.cvs$ perl -le 'require "Slash/Blob.pm"; print $INC{"Sla=
sh/Blob.pm"}'
/usr/local/share/perl/5.8.8/Slash/Blob.pm
My guess is that that first line returns nothing on your site
because getObject("Slash::Blob") returns undef. The output from
the second line may help explain why.
If those lines return similar values to mine, my next guess is
that your "dbs" table is misconfigured. For a one-DB-instance
site it should be empty; if yours isn't, paste a "SELECT * FROM
dbs" into email and let's take a look.
--=20
Jamie McCarthy
http://mccarthy.vg/
ja...@mc...
|
|
From: shane <sh...@lo...> - 2006-08-02 22:50:46
|
On Aug 2, 2006, at 4:00 PM, Jamie McCarthy wrote:
> The "use of uninitialized value" is just a warning. Those
> won'tcause 500 errors, and in most cases aren't worth worrying
> about.(_We_ worry about them because they usually indicate trouble
> spotsin our code to look over, but they're usually not a problem
> forother sites that are just running our code.)
> Likewise, the "_genericGets" is a debugging print that seems tohave
> survived through more releases than it should. Ignore it.
> Here's the actual error:
>> [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
> That code reads (I'm assuming -- the line number on my checkout isa
> little off):
> if ($constants->{plugin}{Blob}) { my $blobdb
> = getObject("Slash::Blob"); my $files = $blobdb-
> >getFilesForStory($sid);
> The problem is that the Blob plugin constant is set, whichactually
> just means there's a line in the site_info table withname='plugin'
> and value='Blob'. That's supposed to (and usuallydoes) indicate
> that Blob is installed. But
> getObject("Slash::Blob")
> is returning undef. This could be for a number of reasons.
> Trythese tests. You should see something like what I see on my
> testsystem:
> jamie@daisy:~/slash.cvs$ perl -MSlash::Test=slash -le 'print
> getObject("Slash::Blob")'Slash::Blob=HASH(0x96c4f28)
> jamie@daisy:~/slash.cvs$ perl -le 'require "Slash/Blob.pm"; print
> $INC{"Slash/Blob.pm"}'/usr/local/share/perl/5.8.8/Slash/Blob.pm
> My guess is that that first line returns nothing on your
> sitebecause getObject("Slash::Blob") returns undef. The output
> fromthe second line may help explain why.
> If those lines return similar values to mine, my next guess isthat
> your "dbs" table is misconfigured. For a one-DB-instancesite it
> should be empty; if yours isn't, paste a "SELECT * FROMdbs" into
> email and let's take a look.-- Jamie McCarthy http://
> mccarthy.vg/ ja...@mc...
Piggybacking on what Jamie said, this is mentioned in the FAQ: http://
slash.lottadot.com/slash-faq
scroll down to first mention of 'getFilesForStory'
ie
http://slash.lottadot.com/faqster.pl?op=view&fid=1#q114
Shane
--
My slashcode stuff: http://slash.lottadot.com/
Slashcode faq: http://slash.lottadot.com/slash-faq
How to ask a question: http://www.catb.org/~esr/faqs/smart-
questions.html#before
|
|
From: Josh S. <sla...@st...> - 2006-08-03 01:14:25
|
perl -MSlash::Test=slashusr -le 'print getObject("Slash::Blob")'
Error:main:-e:1:Can't locate MIME/Types.pm in @INC
**grumble**
cpan> install MIME::Types
perl -MSlash::Test=slashusr -le 'print getObject("Slash::Blob")'
Slash::Blob=HASH(0x806323c)
Huzzah!
And more importantly, it now works. Thanks very much for the help. Why
MIME::Types wasn't installed.... dunno, not going to concern myself with
such things. I'll just enjoy the fact that it works now.
Thanks once again to Jamie and Shane.
On Wed, 2 Aug 2006 17:04:50 -0400, "shane" <sh...@lo...> said:
>
> On Aug 2, 2006, at 4:00 PM, Jamie McCarthy wrote:
>
> > The "use of uninitialized value" is just a warning. Those
> > won'tcause 500 errors, and in most cases aren't worth worrying
> > about.(_We_ worry about them because they usually indicate trouble
> > spotsin our code to look over, but they're usually not a problem
> > forother sites that are just running our code.)
> > Likewise, the "_genericGets" is a debugging print that seems tohave
> > survived through more releases than it should. Ignore it.
> > Here's the actual error:
> >> [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
> > That code reads (I'm assuming -- the line number on my checkout isa
> > little off):
> > if ($constants->{plugin}{Blob}) { my $blobdb
> > = getObject("Slash::Blob"); my $files = $blobdb-
> > >getFilesForStory($sid);
> > The problem is that the Blob plugin constant is set, whichactually
> > just means there's a line in the site_info table withname='plugin'
> > and value='Blob'. That's supposed to (and usuallydoes) indicate
> > that Blob is installed. But
> > getObject("Slash::Blob")
> > is returning undef. This could be for a number of reasons.
> > Trythese tests. You should see something like what I see on my
> > testsystem:
> > jamie@daisy:~/slash.cvs$ perl -MSlash::Test=slash -le 'print
> > getObject("Slash::Blob")'Slash::Blob=HASH(0x96c4f28)
> > jamie@daisy:~/slash.cvs$ perl -le 'require "Slash/Blob.pm"; print
> > $INC{"Slash/Blob.pm"}'/usr/local/share/perl/5.8.8/Slash/Blob.pm
> > My guess is that that first line returns nothing on your
> > sitebecause getObject("Slash::Blob") returns undef. The output
> > fromthe second line may help explain why.
> > If those lines return similar values to mine, my next guess isthat
> > your "dbs" table is misconfigured. For a one-DB-instancesite it
> > should be empty; if yours isn't, paste a "SELECT * FROMdbs" into
> > email and let's take a look.-- Jamie McCarthy http://
> > mccarthy.vg/ ja...@mc...
>
> Piggybacking on what Jamie said, this is mentioned in the FAQ: http://
> slash.lottadot.com/slash-faq
>
> scroll down to first mention of 'getFilesForStory'
>
> ie
>
> http://slash.lottadot.com/faqster.pl?op=view&fid=1#q114
>
> Shane
>
>
>
> --
> My slashcode stuff: http://slash.lottadot.com/
> Slashcode faq: http://slash.lottadot.com/slash-faq
> How to ask a question: http://www.catb.org/~esr/faqs/smart-
> questions.html#before
>
>
>
|
|
From: Jamie M. <ja...@mc...> - 2006-08-03 13:36:33
|
sla...@st... (Josh Stedman) writes:
> And more importantly, it now works. Thanks very much for the
> help. Why MIME::Types wasn't installed.... dunno, not going to
> concern myself with such things. I'll just enjoy the fact that
> it works now.
Heh:
jamie@daisy:~/slash.cvs/plugins/Blob$ cat README=20
This plugin requires the MIME::Types perl module.
I think 'install-plugin' now shakes its finger at you and directs
you to read README files when it completes. But maybe we should
print them out to the console after the plugin installs are done?
I should have remembered MIME::Types, I think people have asked
about that before on this list...
--=20
Jamie McCarthy
http://mccarthy.vg/
ja...@mc...
|