Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-09-16 18:02:57

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Lists with more than 3 li's are broke.

In txp 4.05

  • One
  • Two
  • Three

results in <ul><li></li><li></li><li></li></ul>

  • One
  • Two
  • Three
  • Four

results in <ul><li></li><li></li><li></li></ul> <ul><li></li></ul>

Offline

#2 2007-09-16 18:24:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: Lists with more than 3 li's are broke.

Works fine at Textile

* One * Two * Three * Four

Produces:

<ul> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> </ul>

Last edited by jstubbs (2007-09-16 18:24:52)

Offline

#3 2007-09-16 18:26:37

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Lists with more than 3 li's are broke.

have you tried it in a txp 4.05 article?

Offline

#4 2007-09-16 18:27:37

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Lists with more than 3 li's are broke.

hey lee

i think this may apply to you. should also be included in 4.0.6 hopefully within a few weeks (as per ruuds comments)

http://forum.textpattern.com/viewtopic.php?pid=157427#p157427

Offline

#5 2007-09-16 19:14:28

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Lists with more than 3 li's are broke.

^^ yes, already fixed in SVN. This bug occurs only when using PHP 5.2.4 (or above) and affects the last LI, no matter how many LI’s are in the UL/OL.

Offline

#6 2007-09-16 19:16:42

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Lists with more than 3 li's are broke.

Thanks for letting me know guy’s.

Offline

#7 2007-09-19 15:23:08

carlton.whitehead
New Member
Registered: 2007-09-19
Posts: 1

Re: Lists with more than 3 li's are broke.

ruud wrote:

^^ yes, already fixed in SVN. This bug occurs only when using PHP 5.2.4 (or above) and affects the last LI, no matter how many LI’s are in the UL/OL.

Are you referring to the textpattern SVN, or something else? Is this a broader problem with PHP 5.2.4 that is just exposed by something in textile?

Last edited by carlton.whitehead (2007-09-19 15:23:34)

Offline

#8 2007-09-19 15:29:53

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Lists with more than 3 li's are broke.

Textile relied on non-documented behaviour when using foreach loops combined with the next function. That behaviour changed in PHP 5.2.4, so we had to patch Textile: TXP SVN changeset 2640

Offline

#9 2007-09-20 16:15:01

Dio
New Member
Registered: 2007-09-20
Posts: 2

Re: Lists with more than 3 li's are broke.

I am also affected by this problem.

  1. Is there a work-around for Textpattern 4.0.5?
  2. Since it will be fixed in Textpattern 4.0.6, when will 4.0.6 be released?

(I see it’s working here – looks like the Textpattern forum is running on PHP < 5.2.4)

Offline

#10 2007-09-20 18:10:48

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: Lists with more than 3 li's are broke.

the fix is posted right above you.

Offline

#11 2007-09-20 18:14:07

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Lists with more than 3 li's are broke.

Here: http://dev.textpattern.com/changeset/2640

You’ll need to open and re save existing articles.

Offline

#12 2007-09-20 19:25:03

Dio
New Member
Registered: 2007-09-20
Posts: 2

Re: Lists with more than 3 li's are broke.

iblastoff wrote:

the fix is posted right above you.

I thought there might be a work-around in Textile itself without having to edit the PHP file. Anyway, I have now edited the file and re-saved my articles so problem solved.

I assume this will be “permanently” fixed in Textpattern 4.0.6?

Offline

#13 2007-09-20 19:34:23

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Lists with more than 3 li's are broke.

That’s a correct assumption.

Offline

#14 2007-09-27 08:45:48

fonant
New Member
From: West Sussex, UK
Registered: 2007-09-27
Posts: 4
Website

Re: Lists with more than 3 li's are broke.

If only I’d found this forum before finding my own fix for this! Thanks for the fix, folks, neater than mine.

Further down in the fList() function, should the line
$line .= n;
read
$line .= "\n";
It’s not obvious from the code why this was added…

Offline

#15 2007-09-27 20:40:22

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Lists with more than 3 li's are broke.

fonant,

No. It’s absolutely the same. It just output linebreak to the returned code. And by my self I would prefer that one without quotes.

Cheers!

Offline

Board footer

Powered by FluxBB