from the static-page-vs-dynamic-page(?) dept.
An AC reported that they saw (parameterized here; replace text with corresponding character and remove all spaces):
underscore underscore SLASHLINK underscore underscore
when they viewed all comments on a story and/or tried to reply to a comment.
From an investigation of the code, it appears to be triggered by the setting of the slash var "article_link_story_dynamic" — on dev it's set to "1" but I cannot see its setting on production.
This post is an attempt to reproduce the problem.
The problem arises when a story includes a reference to another story on the site (if I understand correctly: the url contains a reference to article.pl)
So, here's a link to one: http://dev.soylentnews.org/article.pl?sid=14/11/20/1737231 (which linked to the story: "Testing Factors for Character Entity and UTF-8 fixes")
A quick review of (an old copy of) the code suggested the site var "article_link_story_dynamic" may be the culprit:
plugins/Relocate/Relocate.pm: next if $token->[1]{href} eq '__SLASHLINK__';
Slash/Utility/Data/Data.pm: Slash/Utility/Data/Data.pm: $retval = q{
Slash/Utility/Data/Data.pm:HTML with slashized links (see slashizedLinks()) and converts them to
Slash/Utility/Data/Data.pm: _slashlink_to_link($1, $options)
Slash/Utility/Data/Data.pm:sub _slashlink_to_link {
Slash/Utility/Data/Data.pm:# behavior of _slashlink_to_link.
Slash/Utility/Data/Data.pm: # Set article_link_story_dynamic to 2 or greater and
Slash/Utility/Data/Data.pm: my $force_dyn = $constants->{article_link_story_dynamic} > 1 ? 1 : 0;
Slash/Utility/Display/Display.pm: my $dynamic = $constants->{article_link_story_dynamic} || $story_link->{dynamic} || 0;
sql/mysql/upgrades:6143:INSERT INTO vars (name, value, description) VALUES ("article_link_story_dynamic", "0", "Change default dynamic status for story linking");
Related Stories
Test factors for validating implementation of character entities and UTF-8 characters throughout SN.
These are the variables to permute:
- Characters under test: (cf: Trying some UTF-8 characters; POT, 0x0000 - 0x07ff POT, and 0x0800 - 0x0fff; POT)
- ampersand,
- less-than,
- greater-than,
- quote,
- Sampling of other named character entities,
- sampling of UTF-8 1-octet chars,
- sampling of UTF-8 2-octet chars,
- sampling of UTF-8 3-octet chars,
- sampling of UTF-8 4-octet chars (requires MySQL database update).
- Ordering of less-than and greater-than characters. (Slashcode has processing to strip HTML end elements which lack matching start elements.)
- Character representation:
- literal character,
- named character entity,
- decimal numeric character entity,
- hexadecimal numeric character entity.
- Text entry location (places where user input is obtained for later display):
- Story Submission (e.g. http://soylentnews.org/submit.pl):
- "Your Name",
- "Your Email or Homepage",
- "Title",
- "The Scoop",
- Editor's story processing (e.g. http://soylentnews.org/submit.pl?op=viewsub&subid=4848&title=Coal+Plants+Get+New+Lease+on+Life+with+Natural+Gas and then after Preview: (http://soylentnews.org/admin.pl) and then after approval, go in and edit the story again: (http://soylentnews.org/admin.pl?op=edit&sid=14/11/20/1556209.)
- "Dept" (e.g. from the hyphenated-words dept.),
- "Intro Copy" text area,
- "Extended Copy" text area,
- "Media" text area,
- Comment reply to a story (http://soylentnews.org/comments.pl?sid=4950&op=reply&threshold=-1&commentsort=0&mode=improvedthreaded#post_comment:
- "Subject",
- "Comment" text area
- Journal article submission: (http://soylentnews.org/my/journal and then click Write in Journal):
- "Subject",
- "Entry" text area,
- Journal Reply/Comment entry
- "Subject",
- "Comment"
- Poll creation (cf: http://soylentnews.org/pollBooth.pl) (Need help here; never submitted a poll before!)
- text(?),
- poll comment(?)
- Poll responses:
- "Subject" (??),
- "Comment" (??),
- Other (??)
- User preferences (http://soylentnews.org/my/info — "User" tab:
- "Real Name",
- "Email Address",
- "Homepage",
- "AIM",
- "ICQ UIN",
- "Yahoo! ID",
- "Jabber",
- "Public Calendar",
- "Mobile Text Address",
- "Sig" (120 chars),
- "Bio" (255 chars).
- Homepage - "User Space" text area (http://soylentnews.org/my/homepage) i.e. "If you choose 'User Space' above, the contents of this box will be inside:"
- Anything else?
- Story Submission (e.g. http://soylentnews.org/submit.pl):
- Story submission / comment submission format:
- "Plain Old Text",
- "HTML Formatted",
- "Extrans (html tags to text)",
- "code"
- Text viewing location:
- On-line web page,
- Print formatted story (printer icon) (e.g. http://soylentnews.org/print.pl?sid=14/11/20/1556209),
- e-mailed story,
- web message,
- RSS feed,
- Atom feed,
- "Authors page" (e.g. http://soylentnews.org/authors.pl),
- Author's Story list page (e.g. http://soylentnews.org/search.pl?op=stories&author=76),
- News Feed (NNTP) (How do we do this?),
- "Palm" (How do we do this?),
- Search results page (e.g. from using: http://soylentnews.org/search.pl).
- User's Info Page: (e.g. http://soylentnews.org/~martyb/),
- Comment list section as displayed here,
- Additional comments: next batch of comments and following,
- Recent Submissions section.
- PollBooth slashbox
- Poll Results (e.g. http://soylentnews.org/pollBooth.pl?qid=51&aid=-1
- Preview count: how many times a user has previewed a story submission or [journal|story] comment prior to submitting (preview has had some issues in the past.):
- Once,
- Twice,
- Thrice
If I have missed any user-visible input/output/modification location, please reply and let me know!
(Score: 2) by The Mighty Buzzard on Thursday November 27 2014, @09:31AM
I'm apparently not getting what the actual bug is. Slashlinks are a part of our system but users should never see them and I see no recipe to reproduce whatever this bug is.
123
456
789
(Score: 2) by martyb on Thursday November 27 2014, @09:34AM
In the above story, where it contains:
So, here's a link to one: http://dev.soylentnews.org/article.pl?sid=14/11/20/1737231 (which linked to the story: "Testing Factors for Character Entity and UTF-8 fixes")</blockquote>
When I do a view source (using Pale Moon 24.7.2 (x86)) on that text, I saw:
So, here's a link to one: <a href="__SLASHLINK__" sect="mainpage" sid="14/11/20/1737231" sn="article" tid="5">http://dev.soylentnews.org/article.pl?sid=14/11/20/1737231</a> (which linked to the story: "Testing Factors for Character Entity and UTF-8 fixes")
and, when I right clicked on that link and copied the link, it was captured as:
http://dev.soylentnews.org/__SLASHLINK__
So, I have been able to reproduce the problem, but my original idea as to the cause did not pan out. Hopefully, the included references in the original submission provide a starting point for where to look.
(Score: 2) by martyb on Thursday November 27 2014, @09:38AM
(Score: 3) by The Mighty Buzzard on Thursday November 27 2014, @09:42AM
Set article_link_story_dynamic to 0 and it disappears. I wasn't ever that impressed with the slashlink behavior anyway, so I have no problem disabling it. Will ask PJ about it Monday if I remember.
123
456
789
(Score: 2) by martyb on Thursday November 27 2014, @09:43AM
The motivation for all this was seeing this comment on the main site: http://soylentnews.org/comments.pl?sid=5039&cid=120451 [soylentnews.org]
(Score: 2) by The Mighty Buzzard on Monday December 22 2014, @12:07PM
123
456
789