Modify

Opened 19 months ago

Closed 17 months ago

Last modified 17 months ago

#10832 closed defect (fixed)

Problem with tableplugin

Reported by: michel.casella@… Owned by: jonny
Priority: normal Component: TablePlugin
Severity: normal Keywords: table collision
Cc: Trac Release: 0.12

Description (last modified by rjollos)

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 17 months ago by anonymous

ditto

comment:2 Changed 17 months ago by rjollos

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

comment:3 Changed 17 months ago by rjollos

  • 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

     
    2626ATTRIBUTE_REGEX = re.compile('^@([^@\s\:]+)\s*(?:([^\s\(\)\:]+))?\s*(?:\(([^\s\:]+)\))?(?:\:\s*(.*))?', re.I) 
    2727 
    2828 
    29 class TablePlugin(Component): 
     29class StylishTablePlugin(Component): 
    3030 
    31     CONFIG_KEY = 'table' 
     31    CONFIG_KEY = 'stylishtable' 
    3232    DESC_KEY   = '.description' 
    3333 
    3434    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 17 months 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: Changed 17 months ago by anonymous

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

comment:6 Changed 17 months 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 17 months 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 17 months ago by jonny

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

Thanks

comment:9 in reply to: ↑ 5 Changed 17 months ago by rjollos

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 17 months 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 17 months 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 17 months 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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.