#10832 closed defect (fixed)
Problem with tableplugin
Reported by: | Owned by: | jonny | |
---|---|---|---|
Priority: | normal | Component: | TablePlugin |
Severity: | normal | Keywords: | table collision |
Cc: | Trac Release: | 0.12 |
Description (last modified by )
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 ?
Thanks for your help
Michel
Attachments (0)
Change History (12)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Trac Release: | → 0.12 |
comment:3 Changed 12 years ago by
Keywords: | table collision added |
---|
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
26 26 ATTRIBUTE_REGEX = re.compile('^@([^@\s\:]+)\s*(?:([^\s\(\)\:]+))?\s*(?:\(([^\s\:]+)\))?(?:\:\s*(.*))?', re.I) 27 27 28 28 29 class TablePlugin(Component):29 class StylishTablePlugin(Component): 30 30 31 CONFIG_KEY = ' table'31 CONFIG_KEY = 'stylishtable' 32 32 DESC_KEY = '.description' 33 33 34 34 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 12 years ago by
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 12 years ago by
perfect fix, thank you. Interesting find about the hidden table processor in .12
comment:6 Changed 12 years ago by
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 12 years ago by
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 12 years ago by
I've named it StyledTablePlugin, it will use styledtable as the macro.
Thanks
comment:9 Changed 12 years ago by
Replying to anonymous:
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 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
ditto