Details plugin - new issues with white spaces around tag after upgrade to v1.9


(Nordize) #1

A while ago I filed a bug for the spaces within the tag, here, where all my previous [details] tags that were written before upgrading to v1.9 were messed up by the upgrade if the tag contained spaces.

I have two questions:

  • I did do a ./launcher rebuild app several times, including one 2 days ago, which should have pulled the fix from @sam but my old details tags which had new lines after the opening tag and before the closing tag have somehow converted to without any new lines, and they are not parsed. i also rebaked all posts … is there a quick fix for that with rails to restore the newlines so that all details tags work?

  • if a create a post via the API with a details tag that has new lines after the opening tag and before the closing tag then it gets recorded without new lines and the tag is not parsed … this problem did not exist in v1.8. In fact I’m creating posts using the exact same code via the API (it’s a PHP call) which used to work just fine in v1.8.


(Nordize) #2

Bump?

Also, writing

[details=My solution]
bla
bla
[/details]

on my discourse v1.9.0.beta7 +95 still doesn’t work (only shows “My”), despite doing a rebuild app


(Jeff Atwood) #3

I think that has to be in quotes now, as in

My humps

Whatcha gonna do with all that junk
All that junk inside your trunk
I’ma get get get get you drunk
Get you love drunk off my hump
My hump my hump my hump my hump my hump
My hump my hump my hump my lovely little lumps

[details="My humps"]

This brings up a good point, the toolbar button should use those quotes when inserting. I’ll make it so.


(Nordize) #4

Hold on, the other thread I started and the fix was precisely about allowing spaces without quotes because otherwise it breaks compatibility with all pre-v1.9 … please parse non-quoted attributes in here, I have so many broken posts after upgrading from v1.8

What about my other issue above (the fact that my newlines in [details] disappeared)?


(Jeff Atwood) #5

Sorry, I am having trouble understanding you. Post examples please?


(Nordize) #6

See see [details] plugin - spaces in tag name gobble text in v1.9beta


(Jeff Atwood) #7

Oh I see, so perhaps this is a regression @sam? I wasn’t aware it was supposed to work.

My humps

Whatcha gonna do with all that junk
All that junk inside your trunk
I’ma get get get get you drunk
Get you love drunk off my hump
My hump my hump my hump my hump my hump
My hump my hump my hump my lovely little lumps

oh yes that does also work fine here. No regression

[details=My humps]

Regardless better for the editor to insert quotes for all future posts and be more explicit about what is happening, so the change I made is OK.


(Nordize) #8

once again: it does not work on my v1.9.0.beta7 +95 (non-quoted spaces, that is) … it works here, but not on my local v1.9.0.beta7 +95


(Jeff Atwood) #9

If that’s the case then there’s something different / wrong with your config. Details is a plugin so make sure it’s up to date.


(Nordize) #10

Like I said, I’ve already done a rebuild app - is that not sufficient to also update plugins?