Stories
Slash Boxes
Comments

Dev.SN ♥ developers

posted by martyb on Thursday November 27 2014, @09:24AM   Printer-friendly
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");

 
This discussion has been archived. No new comments can be posted.
Display Options Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3) by The Mighty Buzzard on Thursday November 27 2014, @09:42AM

    by The Mighty Buzzard (18) Subscriber Badge <themightybuzzard@soylentnews.org> on Thursday November 27 2014, @09:42AM (#28207) Journal

    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
    Starting Score:    1  point
    Moderation   +1  
    Karma-Bonus Modifier   +1  

    Total Score:   3