Entry tags:
Bug 1964: What should I do next?
[This ended up being sorta like a walkthrough-in-progress ... I'll turn it into a proper walkthrough if I ever finish it!]
Initial pokings at bug 1964 - taglists truncated when crossposting.
First I tried looking at the LJ code and found Changeset 9887 coded by
zorkian himself about 5 years ago. I couldn't figure out how that code could produce the results noted in the support requests though.
Secondly I tried setting up crossposting from my Dreamhack to Dreamwidth itself to see if I could replicate the bug because it seemed it would be easier to isolate if it was in the DW code too. Apparently it does happen in the DW code too which is handy ... these are the tests I ran:
Test 1: Non-new tags
Tags have been used previously on both Dreamhack and DW for this journal.
Initial tag string (269 chars):
Visible on 'Hack after posting (269 chars):
Visible on DW after crosspost (253 chars):
On 'hack in "Edit Entry" tag box (269 chars):
On hack after editing (269 chars):
On DW after editing crossposted (254 chars):
Test 2: New Tags
Tags not previously used on 'hack or on DW.
Initial tag string (269 chars):
Visible on 'Hack after posting (269 chars):
Visible on DW after crosspost (253 chars):
On 'hack in "Edit Entry" tag box (269 chars):
On hack after editing (269 chars):
On DW after editing crossposted (254 chars):
Test 3: Longer New Tags
Initial tag string (409 chars):
Visible on 'Hack after posting (409 chars):
Visible on DW after crosspost (254 chars):
On 'hack in "Edit Entry" tag box (409 chars):
On hack after editing (409 chars):
On DW after editing crossposted (254 chars):
Conclusions so far:
So something in the protocol is truncating this string at 254 characters either before it leaves the sending system, or before the receiving system has a chance to parse the string into an array of tags.
The code for the protocol used by the crossposting system is largely
... at this point I vaguely remember seeing something else potentially relevant in the LJ changesets I waded through so I go back and discover Changeset 9767 and poke at weblib.pl.
It indeed seems that we do still have this limit in DW, it's line 2192 at the moment so I delete the limit and restart everything.
Results now on DW are .... exactly the same.
At this point I am thinking throwing things is an attractive option so I am posting this ...
HALP!
[ETA: OMG headdesk headdesk ... realised literally 1 second after I pressed post of course: I need that patch on the *receiving* system not the sending one! I'm testing the wrong THING... back to the checking board for me.]
Initial pokings at bug 1964 - taglists truncated when crossposting.
First I tried looking at the LJ code and found Changeset 9887 coded by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Secondly I tried setting up crossposting from my Dreamhack to Dreamwidth itself to see if I could replicate the bug because it seemed it would be easier to isolate if it was in the DW code too. Apparently it does happen in the DW code too which is handy ... these are the tests I ran:
Test 1: Non-new tags
Tags have been used previously on both Dreamhack and DW for this journal.
Initial tag string (269 chars):
Tag 1, Tag 2, Tag 3, Tag 4, Tag 5, Tag 6, Tag 7, Tag 8, Tag 9, Tag 10, Tag 11, Tag 12, Tag 13, Tag 14, Tag 15, Tag 16, Tag 17, Tag 18, Tag 19, Tag 20, Tag 21, Tag 22, Tag 23, Tag 24, Tag 25, Tag 26, Tag 27, Tag 28, Tag 29, Tag 30, Tag 31, Tag 32, Tag 33, Tag 34, Tag 35
Visible on 'Hack after posting (269 chars):
tag 1, tag 10, tag 11, tag 12, tag 13, tag 14, tag 15, tag 16, tag 17, tag 18, tag 19, tag 2, tag 20, tag 21, tag 22, tag 23, tag 24, tag 25, tag 26, tag 27, tag 28, tag 29, tag 3, tag 30, tag 31, tag 32, tag 33, tag 34, tag 35, tag 4, tag 5, tag 6, tag 7, tag 8, tag 9
Visible on DW after crosspost (253 chars):
tag 1, tag 10, tag 11, tag 12, tag 13, tag 14, tag 15, tag 16, tag 17, tag 18, tag 19, tag 2, tag 20, tag 21, tag 22, tag 23, tag 24, tag 25, tag 26, tag 27, tag 28, tag 29, tag 3, tag 30, tag 31, tag 32, tag 33, tag 4, tag 5, tag 6, tag 7, tag 8, tag 9
On 'hack in "Edit Entry" tag box (269 chars):
tag 31, tag 30, tag 19, tag 5, tag 24, tag 15, tag 16, tag 28, tag 14, tag 25, tag 23, tag 26, tag 18, tag 12, tag 22, tag 8, tag 29, tag 33, tag 9, tag 20, tag 11, tag 21, tag 27, tag 4, tag 1, tag 34, tag 7, tag 10, tag 13, tag 6, tag 2, tag 32, tag 35, tag 17, tag 3
On hack after editing (269 chars):
tag 1, tag 10, tag 11, tag 12, tag 13, tag 14, tag 15, tag 16, tag 17, tag 18, tag 19, tag 2, tag 20, tag 21, tag 22, tag 23, tag 24, tag 25, tag 26, tag 27, tag 28, tag 29, tag 3, tag 30, tag 31, tag 32, tag 33, tag 34, tag 35, tag 4, tag 5, tag 6, tag 7, tag 8, tag 9
On DW after editing crossposted (254 chars):
tag 1, tag 10, tag 11, tag 12, tag 13, tag 14, tag 15, tag 16, tag 18, tag 19, tag 2, tag 20, tag 21, tag 22, tag 23, tag 24, tag 25, tag 26, tag 27, tag 28, tag 29, tag 30, tag 31, tag 32, tag 33, tag 34, tag 35, tag 4, tag 5, tag 6, tag 7, tag 8, tag 9
Test 2: New Tags
Tags not previously used on 'hack or on DW.
Initial tag string (269 chars):
New 1, New 2, New 3, New 4, New 5, New 6, New 7, New 8, New 9, New 10, New 11, New 12, New 13, New 14, New 15, New 16, New 17, New 18, New 19, New 20, New 21, New 22, New 23, New 24, New 25, New 26, New 27, New 28, New 29, New 30, New 31, New 32, New 33, New 34, New 35
Visible on 'Hack after posting (269 chars):
new 1, new 10, new 11, new 12, new 13, new 14, new 15, new 16, new 17, new 18, new 19, new 2, new 20, new 21, new 22, new 23, new 24, new 25, new 26, new 27, new 28, new 29, new 3, new 30, new 31, new 32, new 33, new 34, new 35, new 4, new 5, new 6, new 7, new 8, new 9
Visible on DW after crosspost (253 chars):
new 1, new 10, new 11, new 12, new 13, new 14, new 15, new 16, new 17, new 18, new 19, new 2, new 20, new 21, new 22, new 23, new 24, new 25, new 26, new 27, new 28, new 29, new 3, new 30, new 31, new 32, new 33, new 4, new 5, new 6, new 7, new 8, new 9
On 'hack in "Edit Entry" tag box (269 chars):
new 9, new 21, new 18, new 35, new 7, new 19, new 29, new 1, new 3, new 2, new 14, new 27, new 34, new 31, new 28, new 11, new 22, new 8, new 32, new 23, new 10, new 26, new 6, new 12, new 25, new 15, new 24, new 4, new 16, new 13, new 30, new 33, new 17, new 20, new 5
On hack after editing (269 chars):
new 1, new 10, new 11, new 12, new 13, new 14, new 15, new 16, new 17, new 18, new 19, new 2, new 20, new 21, new 22, new 23, new 24, new 25, new 26, new 27, new 28, new 29, new 3, new 30, new 31, new 32, new 33, new 34, new 35, new 4, new 5, new 6, new 7, new 8, new 9
On DW after editing crossposted (254 chars):
new 1, new 10, new 11, new 12, new 13, new 14, new 15, new 16, new 17, new 18, new 19, new 2, new 21, new 22, new 23, new 24, new 25, new 26, new 27, new 28, new 29, new 3, new 30, new 31, new 32, new 33, new 34, new 35, new 4, new 6, new 7, new 8, new 9
Test 3: Longer New Tags
Initial tag string (409 chars):
Long Tag Is Long 1, Long Tag Is Long 2, Long Tag Is Long 3, Long Tag Is Long 4, Long Tag Is Long 5, Long Tag Is Long 6, Long Tag Is Long 7, Long Tag Is Long 8, Long Tag Is Long 9, Long Tag Is Long 10, Long Tag Is Long 11, Long Tag Is Long 12, Long Tag Is Long 13, Long Tag Is Long 14, Long Tag Is Long 15, Long Tag Is Long 16, Long Tag Is Long 17, Long Tag Is Long 18, Long Tag Is Long 19, Long Tag Is Long 20
Visible on 'Hack after posting (409 chars):
long tag is long 1, long tag is long 10, long tag is long 11, long tag is long 12, long tag is long 13, long tag is long 14, long tag is long 15, long tag is long 16, long tag is long 17, long tag is long 18, long tag is long 19, long tag is long 2, long tag is long 20, long tag is long 3, long tag is long 4, long tag is long 5, long tag is long 6, long tag is long 7, long tag is long 8, long tag is long 9
Visible on DW after crosspost (254 chars):
long tag is, long tag is long 1, long tag is long 10, long tag is long 11, long tag is long 12, long tag is long 2, long tag is long 3, long tag is long 4, long tag is long 5, long tag is long 6, long tag is long 7, long tag is long 8, long tag is long 9
On 'hack in "Edit Entry" tag box (409 chars):
long tag is long 8, long tag is long 15, long tag is long 14, long tag is long 11, long tag is long 2, long tag is long 13, long tag is long 6, long tag is long 5, long tag is long 3, long tag is long 20, long tag is long 9, long tag is long 17, long tag is long 10, long tag is long 7, long tag is long 12, long tag is long 4, long tag is long 18, long tag is long 19, long tag is long 16, long tag is long 1
On hack after editing (409 chars):
long tag is long 1, long tag is long 10, long tag is long 11, long tag is long 12, long tag is long 13, long tag is long 14, long tag is long 15, long tag is long 16, long tag is long 17, long tag is long 18, long tag is long 19, long tag is long 2, long tag is long 20, long tag is long 3, long tag is long 4, long tag is long 5, long tag is long 6, long tag is long 7, long tag is long 8, long tag is long 9
On DW after editing crossposted (254 chars):
long tag, long tag is long 11, long tag is long 13, long tag is long 14, long tag is long 15, long tag is long 17, long tag is long 2, long tag is long 20, long tag is long 3, long tag is long 5, long tag is long 6, long tag is long 8, long tag is long 9
Conclusions so far:
- This happens between two DW instances so it's not an LJ-specific bug
- It doesn't matter if the tag is new to the system or not
- Tag length is not significant, only string length
- The raw tag string is being truncated at 254 characters. I got 253 a few times but both times there was no truncated tag so I hypothesise the 254th character was a space on those occasions.
So something in the protocol is truncating this string at 254 characters either before it leaves the sending system, or before the receiving system has a chance to parse the string into an array of tags.
The code for the protocol used by the crossposting system is largely
LJ::Protocol
, stored in $LJHOME/cgi-bin/ljprotocol.pl
.... at this point I vaguely remember seeing something else potentially relevant in the LJ changesets I waded through so I go back and discover Changeset 9767 and poke at weblib.pl.
It indeed seems that we do still have this limit in DW, it's line 2192 at the moment so I delete the limit and restart everything.
Results now on DW are .... exactly the same.
At this point I am thinking throwing things is an attractive option so I am posting this ...
HALP!
[ETA: OMG headdesk headdesk ... realised literally 1 second after I pressed post of course: I need that patch on the *receiving* system not the sending one! I'm testing the wrong THING... back to the checking board for me.]