Modify

Opened 15 years ago

Closed 15 years ago

#6189 closed defect (fixed)

Bug - Macro doesn't work anyway

Reported by: tom@… Owned by: David Francos Cuartero
Priority: high Component: TicketBackLinksMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

The Plungin doesn't work as I installed it.
I got this Error:

Error: Macro TicketBackLinks(##ticket nr##) failed
1146Table '####db name#####.WIKI' doesn't exist

I didn't use it anymore - after about a month I looked back at the code and found this bug:

You wrote - starting with Line 44:

        sql = 'SELECT w1.name FROM wiki w1, ' + \
                  '(SELECT name, MAX(version) AS VERSION FROM WIKI GROUP BY NAME) w2 ' + \
                  'WHERE w1.version = w2.version AND w1.name = w2.name '
	sql += 'AND ( w1.text LIKE \'%%[ticket:%s]%%\' ' % thispage
	sql += 'OR w1.text LIKE \'%%#%s %%\' )' % thispage

correct:

        sql = 'SELECT w1.name FROM wiki w1, ' + \
                  '(SELECT name, MAX(version) AS VERSION FROM wiki GROUP BY NAME) w2 ' + \
                  'WHERE w1.version = w2.version AND w1.name = w2.name '
	sql += 'AND ( w1.text LIKE \'%%[ticket:%s]%%\' ' % thispage
	sql += 'OR w1.text LIKE \'%%#%s %%\' )' % thispage

There is two times the Table - wiki - but once in small the second time in big letters.

To make the Plugin work

  1. edit macro.py on line 45 to
    '(SELECT name, MAX(version) AS VERSION FROM wiki GROUP BY NAME) w2 ' + \
    
  2. cd to the directory with the setup.py and >python setup.py install
  3. restart your webserver
  4. activate the plugin in your admin or config if you haven't allready.

kind regards ToM

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by anonymous

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain David Francos Cuartero.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.