Opened 4 years ago

Closed 3 years ago

Problem with tableplugin

Reported by: Owned by: michel.casella@… jonny normal TablePlugin normal table collision 0.12

Hi,

I try to use TablePlugin with Trac 0.12.

I installed the plugin but nothing happens.

The table processor seems to be unchanged.

The wiki page TablePluginStyles in never created.

With the example given in the plugin documentation, I always obtain :

!#table must contain at least one table cell (and table cells only)


Do you have an idea ?

Michel

ditto

comment:2 Changed 3 years ago by rjollos

• Description modified (diff)
• Trac Release set to 0.12

comment:3 Changed 3 years ago by rjollos

The problem is that Trac 0.12 has a built-in table processor, which seems to be undocumented on the t:WikiProcessors page. You can see it in 0.12 and it didn't exist in 0.11.7.

You can fix it with a patch such as this one, and then call the processor with #!stylishtable:

• ../tableplugin/0.12/table/table.py

 ATTRIBUTE_REGEX = re.compile('^@([^@\s\:]+)\s*(?:([^\s\:]+))?\s*(?:$$([^\s\:]+)$$)?(?:\:\s*(.*))?', re.I) class TablePlugin(Component): class StylishTablePlugin(Component): CONFIG_KEY = 'table' CONFIG_KEY = 'stylishtable' DESC_KEY   = '.description' implements(IWikiMacroProvider)

I've chosen what is probably not the best name. Let's wait for feedback from author jonny, but if we don't hear back in 2 weeks I'll commit a fix, per the policies in AdoptingHacks.

comment:4 Changed 3 years ago by rjollos

In case it wasn't obvious from my previous comment, the real problem here is that the table WikiProcessor in the Trac core gets called for Trac 0.12 and later rather than the table WikiProcessor provided by TablePlugin.

comment:5 follow-up: ↓ 9 Changed 3 years ago by anonymous

perfect fix, thank you. Interesting find about the hidden table processor in .12

comment:6 Changed 3 years ago by rjollos

Glad it is working for you. I'll post a link back here when I update t:WikiProcessors with info on the table processor. I had also recently learned about an rtl WikiProcessor and asked if we should add documentation.

As far as a permanent name for the WikiProcessor for this plugin, how about styled-table? I'll have to wait the 2 weeks to make that change, unless the author replies before then.

comment:7 Changed 3 years ago by jonny

Interesting, nice catch!

I've updated both 0.11 and 0.12 versions with the above fix.

I called it CustomTablePlugin and customtable for now. I will think of a better name for it and check that in when I do.

I'll also update the main wiki page to communicate the changes.

Thanks

comment:8 Changed 3 years ago by jonny

I've named it StyledTablePlugin, it will use styledtable as the macro.

Thanks

comment:9 in reply to: ↑ 5 Changed 3 years ago by rjollos

perfect fix, thank you. Interesting find about the hidden table processor in .12

It turns out that it's not entirely hidden, but I hadn't seen the documentation previously. See t:WikiProcessors#AvailableProcessors, t:WikiHtml#Tables and t:#9831.

comment:10 Changed 3 years ago by rjollos

• Resolution set to fixed
• Status changed from new to closed

Fixed in [12782] and [12783].

jonny: Should I bump the version from 0.1 to 0.2?

comment:11 Changed 3 years ago by rjollos

(In [12789]) Refs #10832, #10962: Renamed 0.11 directory to trunk. Removed 0.12 directory (was identical to 0.11 directory). Bumped version to 0.2.

comment:12 Changed 3 years ago by rjollos

(In [12791]) Refs #10832, #10962: Removed empty directories. These should have been removed in [12789], but that did not happen when using git-svn.