Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

Poll Comments in Slash 1.0.10

posted by Krow on 07:04 AM April 27th, 2001   Printer-friendly   Email story
nwyman writes "After noticing that poll comments were disappearing on my site (and that others had complained about this, but no real solution was found) I went digging through the code and found that using a qid with underscores in the name was causing the grief.

Alas, I was not able to fix it (selectComments is already using the DBI::quote method on the value). I gave up and after manually removing all underscores from the qid's in SQL the comments showed up!

Since I can't find the bug, I'll just stick to qid's with no underscores."

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login
Loading... please wait.
  • Slash 2 lets you use underscore!  :-)

    You can, if you like, fix this for your local Slash 1.x.  In, change this line:

            sid => sub { $_[0] =~ s|[^A-Za-z0-9/.]||g },

    To this:

            sid => sub { $_[0] =~ s|[^A-Za-z0-9/._]||g },

    That is, just add the underscore to the character class.
  • The tremors haven't stopped from the install yet ;-). Thank you for the fix, I'll add it now.

    YASS: []

  • I've noticed this with dashes too, i was *very* confused untill i noticed that, that is the only difference between all the past polls i had run.
  • Yes, this really should be pulled out to a function and used everywhere a sid/qid is defined/used. As it is, it is only used when the comments for the poll are added and not when the poll is created.

    As for the topic of this thread, I'll upgrade when things cool off ;-). I know I should help debug, but I just got this thing going, I don't want to break it now!


    YASS: []