Replies and comment threads are shown at least two times - SOLVED THANKS

May 12, 2011 15:25

Good day to you...can you please save my sanity ( Read more... )

comments

Leave a comment

av8rmike May 12 2011, 15:50:25 UTC
Yeah, the developers introduced some weirdness in people's custom theme layers when they changed the way "full" and "collapsed" comments printed. I don't suppose you remember what you changed with your EntryPage::print_comment() function?

Reply

flummy_pumpkin May 12 2011, 16:45:54 UTC
It's bloody good you know S2 ;)

I haven't changed anything there, not for ages therefore I was totally confused this morning. Since I have no idea what to do with the if and string stuff I don't touch it not to mess with my layout. The last time I checked on my layer was to change the header but nothing else.

The coding is too long to go in a comment, but if you can and want you can check here
http://www.livejournal.com/customize/advanced/layeredit.bml?id=15976402
I guess it must be viewable

Reply

flummy_pumpkin May 16 2011, 18:47:21 UTC
I really hate to bug you but seems you're my only chance :) Any ideas to help me out?
Layer ID is 15976402 because I'm more than lost when it comes to that :( Would be most awesome...

Reply

av8rmike May 16 2011, 19:32:40 UTC
Hey, I'm sorry I haven't had a chance to get back to you yet. I've had my hands full with all the people in Support having their layouts flip back to Generator (including mine now, LOL). I do have an incentive to fix the comment code because mine's broken too. It shouldn't be too hard to fix, though.

Reply

flummy_pumpkin May 16 2011, 19:51:54 UTC
Poor you, that sounds like a lots of stuff to do. No worries then, if you'll have time anytime all's fine. Didn't know if the comment arrived in your inbox ;)

lol you're abandoning expressive then ;)

I wish it wouldn't be too hard to fix -sigh- ;)

Reply

av8rmike May 17 2011, 13:54:36 UTC
I looked at your layer, but it looks like the only thing different with your print_comment() function and the version from 6 months ago is a line to limit the depth of nesting comments. There have been enough changes to the code over those 6 months that it's easier for you to just remove that function and I'll figure out how to modify the new version than it'd be to tell you how to modify your current version. If I try to give you a bunch of instructions, there's too much potential to screw up something.

Reply

flummy_pumpkin May 17 2011, 20:19:56 UTC
I hate that you know :) All that coding I have not the faintest idea what it wants from me but it is fixed now :D

I copied the function EntryPage::print_comment_full(Comment e) {
from the Layer Source and from what I've seen it seems all fine now. I mean I wouldn't bet on it since I won't trust my eyes tonight anymore.
There was another difference in the function EntryPage line. The old code was

function EntryPage::print_comment(Comment e) {

the new one has this _full added after comment. Do you think it might be this? Because I copied the lines with maxdepth back into my layer and it seems to work still.

Thanks a lot :) I would have never thought of that or where to search. Pity I can't return the favour, or can I

Reply

av8rmike May 17 2011, 20:36:32 UTC
Yeah, I took another look at the layer and it looks like you did everything right. \o/ print_comment_full is the function to print an "expanded" comment, which I think is the one you wanted.

Reply

flummy_pumpkin May 18 2011, 07:29:49 UTC
Thanks for the effort, really. It's more than appreciated -bows-
Yeah suppose that was what I was searching for, just don't really get why it worked until last week, but well doesn't matter now :) All fine and no one asks if they're drunk anymore ;)
Many thanks again :)

Reply

pensive1 May 18 2011, 18:15:10 UTC
I'm having the same issue with double comments. Here's my theme layer [click] for reference. I just now noticed the issue because I'm rarely on my personal LJ anymore due to LJ roleplaying *g*

Reply

flummy_pumpkin May 18 2011, 19:06:41 UTC
When I added _full to that line

function EntryPage::print_comment_full(Comment e) {

it all worked fine again for me again :)

Reply

pensive1 May 18 2011, 20:21:23 UTC
weird, I'm still seeing my comments twice. Hmmm.

Reply

flummy_pumpkin May 18 2011, 20:55:27 UTC
Hmm that's the Expressive Layer Source
http://www.livejournal.com/customize/advanced/layersource.bml?id=7176168&fmt=html
perhaps it's an idea to check if there are any differences in that function? Or you wait for Mike ;) Good luck...

Reply

pensive1 May 18 2011, 21:00:16 UTC
Oh yeah there's definitely some differences.

Mine:
function EntryPage::print_comment_full(Comment e ( ... )

Reply

flummy_pumpkin May 19 2011, 09:27:37 UTC
I must admit I have no idea with that codes, not even the slightest what the want from me with var and strings and ifs. So I copied and pasted my original code into my editor and copied the whole print_comment_full stuff out of the layer source code and overwrote my 'own' print_comment. It compiled with no errors and when I was looking and asked a friend to check, it was all fine. The _full addition was the only thing that stuck out to me, so who knows what else was changed. Perhaps that'll be working for you too?

Reply

av8rmike May 19 2011, 13:33:29 UTC
Hey, sorry it took me a while to get back to you. Re-naming the function works, but you still have to remove some parts. Find the line like this:
if (not $e.full) {
and the closing brace after the word "return". Delete the whole section, including the "not $e.full" line. Also, remove the section towards the end of the function that looks like this:

if (size($e.replies) > 0) {
foreach var Comment c ($e.replies) {
$this->print_comment($c);
}
}
You might want to backup your layer to a text file just in case, and don't hesitate to let me know if there are any problems.

Reply


Leave a comment

Up