Textile doesn't work on Pages

This is the place to discuss bugs that have been found in the most recent version of PivotX. Posting bugs will ensure that the Development Team is aware of them and that they will be addressed when resources are available.

Textile doesn't work on Pages

Postby bretrooks » Mon Oct 06, 2008 9:14 pm

Working on our web page, I've found that Textile doesn't seem to work on Page entries, but it does for Entries. The style toolbar will enter Textile code into a page body, but it just shows up as asterisks, underlines, etc. when you preview or view the published page. Is there any way to squeeze a fix for this into beta 12?

Thanks yet again,
Bret
PivotX 2.0 / MySQL / PHP 5.2.6
bretrooks
 
Posts: 25
Joined: Sun Jun 08, 2008 12:38 am

Re: Textile doesn't work on Pages

Postby Bob » Mon Oct 06, 2008 9:41 pm

I'll check it out.. Shouldn't be too hard to fix, if it's really broken.. What do you use in the template [[$page.introduction]] or [[introduction]].. The first one will always display the unparsed value, so you should use the latter.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Textile doesn't work on Pages

Postby bretrooks » Mon Oct 06, 2008 10:03 pm

Our template is (for now) pretty much the stock template, which looks like it uses [[introduction]]. (We've added and rearranged a few items, made a couple small tweaks to the CSS, and swapped out the header photo, but that's about it.)

It may be worth mentioning that one of the guys on this shared blog was having a bit of trouble getting his Markdown to parse correctly on his first Entry. I haven't ever used Markdown myself, and I ended up just editing the html to clean it up. (I know this isn't of much use as it is, but I'll let you know if we see it happening again and can get more useful details.)

Thanks,
Bret
PivotX 2.0 / MySQL / PHP 5.2.6
bretrooks
 
Posts: 25
Joined: Sun Jun 08, 2008 12:38 am

Re: Textile doesn't work on Pages

Postby Bob » Tue Oct 07, 2008 5:52 pm

Hmm, I'm having a hard time tracking this down.. As far as i can tell, writing pages in textile and markdown work as expected. At least, for me they do.

So, toget this straight, what you did was the following:
- Go to 'my info' and set text processing to 'textile'
- Write a new page. You see the textile editor, and it inserts textile markup.
- You post the page.
- You view the page on the site, and it still shows **hello** for text that ought to be bold.

Is that the situation?

Have you:
- tried using the default bare bones page_template.html?
- Tried enabling debug, to see if the debug output gives any clue what's happening?
- And you mentioned it does work for Entries, right?
- Tried if it makes a difference whether you're writing a _new_ page, or editing an existing page?

edit: Oh, i do see one bug! It doesn't parse properly when previewing.. But, _posting_ it, and viewing it on the site ought to work.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Textile doesn't work on Pages

Postby bretrooks » Tue Oct 07, 2008 6:57 pm

I get the problem both when editing previous entries and when posting new pages.

I checked to make sure I had my user profile set to Textile, I created a new page using the barebones template, and I inserted some Textile (manually, using the toolbar, and using keyboard shortcuts). This is what I got:

Editor page:
Editor Page.png
Editor Page.png (13.5 KiB) Viewed 10810 times


Page as posted:
Posted Page.png
Posted Page.png (6.28 KiB) Viewed 10810 times


Turning on debug didn't raise any flags. What else can I do to help figure this out?

Thanks,
Bret
PivotX 2.0 / MySQL / PHP 5.2.6
bretrooks
 
Posts: 25
Joined: Sun Jun 08, 2008 12:38 am

Re: Textile doesn't work on Pages

Postby Bob » Tue Oct 07, 2008 7:14 pm

This is a really odd problem.. Is it possible for me to get temporary access to FTP and the Pivot in question? I've no clue what might be the problem now, but i'm sure i can track it down if i have access. Feel free to PM or email me.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Textile doesn't work on Pages

Postby bretrooks » Tue Oct 07, 2008 8:40 pm

PM sent...
PivotX 2.0 / MySQL / PHP 5.2.6
bretrooks
 
Posts: 25
Joined: Sun Jun 08, 2008 12:38 am

Re: Textile doesn't work on Pages

Postby Bob » Thu Oct 09, 2008 6:10 pm

Bret,

Any news if it has indeed been fixed? The other issue you mentioned (this one) has been fixed in SVN, and will be in the official release of beta 12. Thanks.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Re: Textile doesn't work on Pages

Postby bretrooks » Thu Oct 09, 2008 8:47 pm

It looks like most things are worked out--I created a new page with Textile and edited an old one, and both now show up correctly. Thanks!

I do have two related issues that I've run across:

1) If I create a page using Textile, and then change my settings and then go to the page, it doesn't parse anymore. Does this mean that once a user picks a type of markdown, they can never change it? I can see why this might be, but it could end up being restrictive. Or is it a bug?

2) Can we have an editor button to directly edit the source of a page we're working on, no matter what markdown we choose? This is really handy in a variety of situations.

For example, I have a few locations on one page where I have hidden tags stuck in the code. The Textile reads:
* Item one
* Item two
* Item three
* et cetera...

...but there are irregular gaps between some of the list items when I view the page. The source from the browser shows that there is a </ul><ul> stuck between those items, but I haven't find a way get to it and remove it. An editor button might be able to resolve this. Any other ideas?

Thanks yet again for all your work,
Bret
PivotX 2.0 / MySQL / PHP 5.2.6
bretrooks
 
Posts: 25
Joined: Sun Jun 08, 2008 12:38 am

Re: Textile doesn't work on Pages

Postby Bob » Thu Oct 09, 2008 9:01 pm

Hi,

both the points you mention are very hard to solve properly for the same reason: Textile and Markdown are really one-way conversions: There are proper libraries to convert textile to HTML, and to convert Markdown to HTML.. But you can't really convert a (non-trivial) HTML document back to Textile or Markdown, without losing much of the details of the markup

So, that's why a page or entry that is written in textile is opened in HTML or Wysiwyg mode, it is converted to HTML. The other way around, the HTML is left untouched, because textile and markdown leave HTML alone for the most part.. PivotX only removes <p>'s and <br>'s, which are added again by either Textile or Markdown.

To answer your question: "Does this mean that once a user picks a type of markdown, they can never change it?".. Basically, no.. When you author a page using one type of text processing, you should stick to it. No matter how much effort I'd put in it, I don't think i could ever make the conversion back-and-to another text processing work well. That said: a page authored in Textile or Markdown, opened in HTML or wysiwyg should convert just fine, just not the other way around.
Bob
Lead Developer
 
Posts: 1374
Joined: Tue Nov 20, 2007 11:16 pm

Next

Return to 2.x Bugs

Who is online

Users browsing this forum: No registered users and 2 guests

cron