Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2012-04-27 12:35:52

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

Philippe

Let me know if this is a suitable fix for Japanese (and other) footnote markers. If so I’ll look at getting this merged into the master branch.


Steve

Offline

#32 2012-04-27 14:15:57

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: [textile] Links with umlauts don't work

net-carver wrote:

Let me know if this is a suitable fix for Japanese (and other) footnote markers. If so I’ll look at getting this merged into the master branch.

Yeah, I meant to investigate this further, but I ran into this error when trying to save an article (and trying to get this to work):

internal_error "Undefined variable: atts"
in /Users/phiw/Sites/_emps/textpattern/lib/classTextile.php at line 1221
textpattern/lib/classTextile.php:1221 adminErrorHandler()
Textile->fNoteLists()
textpattern/lib/classTextile.php:1198 preg_replace_callback()
textpattern/lib/classTextile.php:510 Textile->placeNoteLists()
textpattern/include/txp_article.php:1114 Textile->TextileThis()

I don’t know exactly what I was trying (what input I had), though, and, as said, I haven’t gotten to investigate it.

Can you post an example (input) that works on your side?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#33 2012-04-27 14:36:13

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

Hi Philippe,

thank you for testing, that’s exactly the kind of report I need. A few questions…

1) Were you using classTextile.php file from the custom-footnote-markers branch?

2) Had you done…

@define('txt_fn_ref_pattern',  '<span{atts}>({marker})</span>');
@define('txt_fn_foot_pattern', '<span{atts}>({marker})</span>');

…before classTextile.php was being loaded?

3) Is there anyway you can get that article text over to me to test?

Thank you!


Steve

Offline

#34 2012-04-27 14:59:00

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: [textile] Links with umlauts don't work

Steve,

Yes and yes to questions 1 and 2, not the question 3, that why I said I need to investigate what I did (i had overwritten the art. with other attempts…).

btw something that does work (now ? A clean test article maybe ?) (with your patch) is

xxx[1]xxxxx 
fn1. "xxx":url here

that generates

xxx(1)xxxxx
(1)"xxx" as linked text

Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#35 2012-04-27 15:10:20

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

phiw13 wrote:

Yes and yes to questions 1 and 2, not the question 3, that why I said I need to investigate what I did (i had overwritten the art. with other attempts…).

From the error message looks like something in the notelist code is causing the problem.

btw something that does work (now ? A clean test article maybe ?) (with your patch) is

xxx[1]xxxxx 
fn1. "xxx":url here

that generates

xxx(1)xxxxx
(1)"xxx" as linked text

Right, that’s exactly the output I was expecting from that branch. Now I know which branch you are using I can start tracking down that error.


Steve

Offline

#36 2012-04-27 15:23:09

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: [textile] Links with umlauts don't work

net-carver wrote:

From the error message looks like something in the notelist code is causing the problem.

Now that you mention notelist, yes I think I (still) had that included in that test article (like this: notelist(myclass#myid)+.). I think it was included at the end of the article.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#37 2012-04-27 17:43:10

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

Philippe,

Are you sure you weren’t using the ja-wiki-links branch classTextile.php when you got the error? In that branch, there is a use of $atts on line 1221 (as per the error message you reported) but there isn’t in the custom-footnote-markers branch.


Steve

Offline

#38 2012-04-28 02:44:38

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: [textile] Links with umlauts don't work

::sigh:: what a giant clusterfuck that whole github thing is, with all its gratuitous animations and what not… Let’s assume I messed this up.
In an above post, you linked to a diff. Said diff is only displayable as sort of ‘pretty print’ (by some definition of pretty, that is). Looking around, I saw, in the top right corner of the diff code box a link (View file @ 37b0dbe) to a full file. I followed that, then found a link to the raw format, which I saved in place of my existing textile file. If that is not the correct thing, apologies. I’ll check with the file you linked to in a subsequent post later, maybe tomorrow.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#39 2012-04-28 13:46:50

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

Hi Philippe,

Apologies — I use it so much I forget to just link to the raw files. So here are a couple of links for you direct to the raw files…

For customising footnotes (both the inline marker and the marker in the foot) use this classTextile.php
For trying out Japanese links (as references, not inline) use this classTextile.php

…just save as classTextile.php in your test setup and you should be fine. If they both work out OK, they’ll get merged together into the next release.


Steve

Offline

#40 2012-04-29 02:52:48

phiw13
Plugin Author
From: South-Western Japan
Registered: 2004-02-27
Posts: 3,631
Website

Re: [textile] Links with umlauts don't work

Ok – tested with 2 different TXP installs on localhost, my normal ‘work’ one, and a plain default one. Both are SVN latest.

Using the second linked classTextile file, doing this

results in error(s) (one error for each note…):
internal_error "Undefined variable: atts"
in /Users/phiw/Sites/_emps/textpattern/lib/classTextile.php at line 1211
textpattern/lib/classTextile.php:1211 adminErrorHandler()
Textile->fNoteLists()
textpattern/lib/classTextile.php:1188 preg_replace_callback()
textpattern/lib/classTextile.php:508 Textile->placeNoteLists()
textpattern/include/txp_article.php:1114 Textile->TextileThis()

Swapping in the first classTextile file – I didn’t find a way to generate custom note marker. And it returns the same errors as above.

Textpattern version: 4.4.1 (r3761) – aka svn latest
PHP version: 5.3.8


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
phiw13 on Codeberg

Offline

#41 2012-04-29 16:11:36

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [textile] Links with umlauts don't work

Hi Philippe,

Thanks for posting an example of textile that generates the problem. It’s actually down to an incorrect use of notedefs — but I should have anticipated that and made textile more robust: I’ll fix it. For what it’s worth, here’s an update to your example that avoids the bug, should you want to compare the two.

While I’m fixing this I also plan to extend the customisable footnote markers to the cover notelist markers in the main text too.


Steve

Offline

Board footer

Powered by FluxBB