Wednesday night maintenance
Moderator: Moderators
Wednesday night maintenance
Nockermensch was kind enough to take a look at the code that writes posts to the database, and he believes he was able to correct the ever-annoying bug that causes missing quote tags to fuck up the format of the entire page. The code looks solid to me, but unfortunately I'm going to have to experiment with it in "production" to verify it works. So...
Wednesday around 10pm EDT I'm going to install the new code, and then run a test or two. If things go to hell in a handbasket quickly I'll undo the changes and revert to the prior version as quickly as possible. If things seem to be OK after I install the new code, I intend to leave it in place, and I'll keep checking in every few minutes over the next couple hours after that to make sure nobody else ran into weird trouble.
If somebody encounters any sort of error while making or editing a post after 10pm Wednesday, please include as much detail as possible here. Also, please do not attempt to verify the bug is fixed right away - if something is wrong, I'll find it quick enough after installing, and having everybody submit a "bad" post just to verify it's fixed won't be good if there's something else wrong.
Thank in advance for your patience on Wednesday evening.
Wednesday around 10pm EDT I'm going to install the new code, and then run a test or two. If things go to hell in a handbasket quickly I'll undo the changes and revert to the prior version as quickly as possible. If things seem to be OK after I install the new code, I intend to leave it in place, and I'll keep checking in every few minutes over the next couple hours after that to make sure nobody else ran into weird trouble.
If somebody encounters any sort of error while making or editing a post after 10pm Wednesday, please include as much detail as possible here. Also, please do not attempt to verify the bug is fixed right away - if something is wrong, I'll find it quick enough after installing, and having everybody submit a "bad" post just to verify it's fixed won't be good if there's something else wrong.
Thank in advance for your patience on Wednesday evening.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
And this post is being submitted with a broken close-quote tag on purpose
[/quote
And we'll see what happens...
Last edited by Zherog on Thu Jul 31, 2014 2:10 am, edited 1 time in total.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
And... that looks about right.
So, the code is pretty simple overall. If there are more open tags than close tags, it simply adds close tags until there are the same number of each. It does this right before submitting the post to the database. I'll do a few more tests, and I'll be around for about an hour or so. If anybody runs into an issue while posting, please let me know here.
So, the code is pretty simple overall. If there are more open tags than close tags, it simply adds close tags until there are the same number of each. It does this right before submitting the post to the database. I'll do a few more tests, and I'll be around for about an hour or so. If anybody runs into an issue while posting, please let me know here.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
So... looks like the code only fixes when there are more open tags than close tags. So, improvement but not perfect. I should be able to tweak the fix to cover both scenarios, but not tonight - my mind is too much goo to concentrate tonight.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
OK, I believe the code will now correct the post regardless of whether the tag is missing at the beginning or the end.
As with yesterday, if anybody sees anything weird please post here. I'll be online for the next 30 minutes to an hour, and I'll make a point to refresh in the morning as well.
As with yesterday, if anybody sees anything weird please post here. I'll be online for the next 30 minutes to an hour, and I'll make a point to refresh in the morning as well.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
Thanks Z!
virgil wrote:Lovecraft didn't later add a love triangle between Dagon, Chtulhu, & the Colour-Out-of-Space; only to have it broken up through cyber-bullying by the King in Yellow.
FrankTrollman wrote:If your enemy is fucking Gravity, are you helping or hindering it by putting things on high shelves? I don't fucking know! That's not even a thing. Your enemy can't be Gravity, because that's stupid.
It appears that when quoting, shit goes haywire when you actually have the quoted person's name in the tag, e.g., <quote="ACOS">, as opposed to just <quote>
I hit "preview", and everything is fine; but when I submit, it gratuitously adds two more open quote tags at the beginning.
I played around a bit with variations I've seen on other boards, but nothing helped but to just make it a generic quote tag.
I hit "preview", and everything is fine; but when I submit, it gratuitously adds two more open quote tags at the beginning.
I played around a bit with variations I've seen on other boards, but nothing helped but to just make it a generic quote tag.
"Civilized men are more discourteous than savages because they know they can be impolite without having their skulls split, as a general thing."
- Robert E. Howard
- Robert E. Howard
-
- Serious Badass
- Posts: 29894
- Joined: Fri Mar 07, 2008 7:54 pm
Yes this. It seems to interpret attributed quote tags as missing quote tags and then "fix them" for you by adding in additional open quote tags to the beginning of the post, which makes everything fucked.ACOS wrote:It appears that when quoting, shit goes haywire when you actually have the quoted person's name in the tag, e.g., <quote="ACOS">, as opposed to just <quote>
I hit "preview", and everything is fine; but when I submit, it gratuitously adds two more open quote tags at the beginning.
I played around a bit with variations I've seen on other boards, but nothing helped but to just make it a generic quote tag.
-Username17
Last edited by Username17 on Fri Aug 01, 2014 10:58 am, edited 3 times in total.
-
- Serious Badass
- Posts: 29894
- Joined: Fri Mar 07, 2008 7:54 pm
Even if you remove the "" in the attributed quotes, it's still fucked.
Even if you add your own attributed quotes in by hand, it's still fucked.
Attributed quotes are just fucked.
-Username17
Even if you add your own attributed quotes in by hand, it's still fucked.
Attributed quotes are just fucked.
-Username17
Last edited by Username17 on Fri Aug 01, 2014 5:22 am, edited 2 times in total.
- nockermensch
- Duke
- Posts: 1898
- Joined: Fri Jan 06, 2012 1:11 pm
- Location: Rio: the Janeiro
What's causing this is the code looking for just [ quote] and not the much more common [ quote="whatever"]. I mailed Zherog a fix for that.
@ @ Nockermensch
Koumei wrote:After all, in Firefox you keep tabs in your browser, but in SovietPutin's Russia, browser keeps tabs on you.
Mord wrote:Chromatic Wolves are massively under-CRed. Its "Dood to stone" spell-like is a TPK waiting to happen if you run into it before anyone in the party has Dance of Sack or Shield of Farts.
I've removed the code that adds the open quotes; the fix from nocker didn't seem to resolve it, and I don't have the time or brainpower at the moment to debug and figure it out completely.
I'll play with it some more tonight. But in the meantime the code to add closing tags is still in place.
I'll play with it some more tonight. But in the meantime the code to add closing tags is still in place.
You can't fix stupid.
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
"A life is not important except in the impact it has on other lives." ~ Jackie Robinson
-
- King
- Posts: 5271
- Joined: Thu Apr 14, 2011 5:32 am
There are three ways to do a quote tag (e's dropped to avoid making actual tags):
[quot]Stuff[/quot]
[quot=XYZ]Stuff[/quot]
[quot="XYZ"]Stuff[/quot]
The first case is simple enough that I don't think it needs addressing.
In the second case, the first close bracket encountered terminates the quote open tag, and as such XYZ cannot contain a close bracket. Except I just lied to you, and it totally can, because you can put tags inside XYZ (like italics tags or URL tags) and those tags will consume close brackets first. Note it has to be an actual tag that gets recognized, not just gibberish in a pair of brackets.
In the third case, the first quotation mark immediately followed by a close bracket terminates the quote open tag, and as such XYZ can contain any number of close brackets and quotation marks (but not a quotation mark followed immediately by a close bracket). As far as I know, there's no exceptions this time, because the only tag which can end in that particular way is the quote open tag, and worrying about the fact that you can put a quote open tag in the middle of a quote open tag (you really can) is beyond the scope of this fix.
Handling one is simple. They're fixed strings. Match, count, compare, add whichever you need*.
Handling three is almost as simple. There is technically a single variable substring, but its contents are completely irrelevant. Match, count, compare, add whichever you need*.
Handling two requires matching tags so you can actually tell whether or not your quote open tag has its closing bracket or if they've all been consumed.
Yes, I just told you to unleash regex or an equivalently unsophisticated tool on an html derivative. We aren't trying to pair tags, only identify them; the former isn't regular, but the latter is.
*I lied to you again. While it is the case that I can't put tags inside those quote tags that will break the matching, there is at least one tag in which you can put a quote tag that modifies the quote tag's behavior: the code tag, which causes all tags contained therein to be printed as text instead of parsed. If someone puts mismatched quote tags inside a code tag, the code breaks. But this is an edge case that's going to come up a lot less than people fucking their tags (i.e. it will never come up). Also don't forget that the three different kinds of quote open tags all share quote close tags. There's the potential for some some silly double/triple-counting errors there.
[quot]Stuff[/quot]
[quot=XYZ]Stuff[/quot]
[quot="XYZ"]Stuff[/quot]
The first case is simple enough that I don't think it needs addressing.
In the second case, the first close bracket encountered terminates the quote open tag, and as such XYZ cannot contain a close bracket. Except I just lied to you, and it totally can, because you can put tags inside XYZ (like italics tags or URL tags) and those tags will consume close brackets first. Note it has to be an actual tag that gets recognized, not just gibberish in a pair of brackets.
In the third case, the first quotation mark immediately followed by a close bracket terminates the quote open tag, and as such XYZ can contain any number of close brackets and quotation marks (but not a quotation mark followed immediately by a close bracket). As far as I know, there's no exceptions this time, because the only tag which can end in that particular way is the quote open tag, and worrying about the fact that you can put a quote open tag in the middle of a quote open tag (you really can) is beyond the scope of this fix.
Handling one is simple. They're fixed strings. Match, count, compare, add whichever you need*.
Handling three is almost as simple. There is technically a single variable substring, but its contents are completely irrelevant. Match, count, compare, add whichever you need*.
Handling two requires matching tags so you can actually tell whether or not your quote open tag has its closing bracket or if they've all been consumed.
Yes, I just told you to unleash regex or an equivalently unsophisticated tool on an html derivative. We aren't trying to pair tags, only identify them; the former isn't regular, but the latter is.
*I lied to you again. While it is the case that I can't put tags inside those quote tags that will break the matching, there is at least one tag in which you can put a quote tag that modifies the quote tag's behavior: the code tag, which causes all tags contained therein to be printed as text instead of parsed. If someone puts mismatched quote tags inside a code tag, the code breaks. But this is an edge case that's going to come up a lot less than people fucking their tags (i.e. it will never come up). Also don't forget that the three different kinds of quote open tags all share quote close tags. There's the potential for some some silly double/triple-counting errors there.
Last edited by DSMatticus on Fri Aug 01, 2014 12:26 pm, edited 3 times in total.