Please also review our SoylentNews Moderation Guidelines.
As always, we are willing to make changes to the system, but please post examples *with* links to any cases of suspected mod abuse. It's a lot easier to justify changing the system when evidence is in black and white. I also recommend that users make serious proposals on changes we can make. I'm not going to color the discussion with my own opinions, but as always, I will respond inline with comments when this goes live, and post a follow up article a few days after this one
(Score: 5, Informative) by paulej72 on Wednesday May 20 2015, @05:58PM
I tried to fix this once, and I could not figure out how the code worked. There is some serious voodoo code at work with this system. Even more so than the typical slash code. If anyone wants to figure it out and post a fix, I am willing to merge it in.
I figured it would be a few lines of code to make the read more only come up if the end would be long enough to justify it, but my code tracing skills were not up to the task of finding out where the truncation was happening.
Team Leader for SN Development
(Score: 3, Interesting) by NCommander on Wednesday May 20 2015, @10:34PM
I took a stab at this myself, and my mind melted. My best guess it was dependent on a behavior in old MySQL versions that changed. When we first setup the site, excessive edits were required since the codebase assumed it was running on a version of MySQL from 2008 (MySQL 3.xx something). I need to take a second look at it and try and fix it now that I've gotten more familiar with the code internals.
Still always moving
(Score: 2) by Marand on Thursday May 21 2015, @09:01AM
There is some serious voodoo code at work with this system. Even more so than the typical slash code.
You're definitely right about that. I took a cursory glance and it's...um...something. I don't know the codebase so I was just searching around, and I saw that it's checking a database value for length and max length (which defaults to 4096 in the sql schema), which seemed like a good start, but that lead dead-ended when I tried actually figuring out where the truncation actually happens. Or is supposed to be happening.
Seems like it'd be easy to set up new truncation rules if you could actually figure out where the magic is happening, but goddamn. Some useful fucking comments would have been great, but the original authors were too pro for that shit I guess. You have my condolences for having to deal with this stuff, it looks like a nightmare. Too much "look at me, I'm clever!" and not enough "# this is what my clever code does".
(Score: 2) by paulej72 on Sunday May 24 2015, @04:14PM
Well with some help from FatPhil, I tracked down the error. The code already had some fuzzy logic for the end, but there was a bug in saving the data to Memcache. The full text version was getting saved to the truncated version location, when ever the full text of the comment was loaded. So after the first time the full text was loaded all users would see the full text instead of the truncated version.
This code has been added to the new rehash code, which should be going live soonish.
Team Leader for SN Development