Modify ↓
Opened 15 years ago
Closed 15 years ago
#6189 closed defect (fixed)
Bug - Macro doesn't work anyway
Reported by: | 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
- edit macro.py on line 45 to
'(SELECT name, MAX(version) AS VERSION FROM wiki GROUP BY NAME) w2 ' + \
- cd to the directory with the setup.py and >python setup.py install
- restart your webserver
- activate the plugin in your admin or config if you haven't allready.
kind regards ToM
Attachments (0)
Note: See
TracTickets for help on using
tickets.