Opened 14 years ago
Closed 11 years ago
#8638 closed defect (fixed)
[PATCH] TagsPlugin should implement wiki_page_renamed method of IWikiChangeListener interface
Reported by: | Itamar Oren | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | wiki rename IWikiChangeListener |
Cc: | Ryan J Ollos, Michael Renzmann | Trac Release: | 0.12 |
Description
Starting Trac 0.12 the WikiRename functionality is available in core, and notifies plugins about page renaming via the wiki_page_renamed() method of the IWikiChangeListener interface.
TagsPlugin should implement this API in order to move tags from old_page to page when a rename is performed.
Attachments (2)
Change History (13)
Changed 13 years ago by
Attachment: | wiki_rename-0.6.patch added |
---|
Changed 13 years ago by
Attachment: | wiki_rename-trunk.patch added |
---|
Patch against trunk to make wiki_page_renamed work.
comment:1 Changed 13 years ago by
Summary: | TagsPlugin should implement wiki_page_renamed method of IWikiChangeListener interface → [PATCH] TagsPlugin should implement wiki_page_renamed method of IWikiChangeListener interface |
---|
Included patches against 0.6 tag and trunk to make tags update accordingly after wiki page rename.
To patch your tagsplugin first apply the patch from comment 5 of ticket 5345 or you will get an error trying to upgrade your existing installation. Then apply the patch normally, e.g.
$ svn co http://trac-hacks.org/svn/tagsplugin/tags/0.6 tagsplugin-0.6
$ cd tagsplugin-0.6
$ patch -p0 < ../wiki_rename-0.6.patch
$ python setup.py bdist_egg
$ cp dist/*.egg /path/to/projenv/plugins
comment:2 Changed 13 years ago by
Keywords: | IWikiChangeListener added |
---|---|
Type: | defect → enhancement |
#8670 has been closed as a duplicate of this ticket.
BTW, why should a missing new functionality for a 0.11
plugin with "works with 0.12 too" be considered as a bug? If it was explicitly designed for Trac 0.12, in fact it isn't, so please be reasonable.
Nevertheless the hint and patches are highly appreciated and should go into the repo soon. Thank you for your the effort put into this.
comment:3 Changed 13 years ago by
(In [10632]) TagsPlugin: Implement IWikiChangeListener
interface for Trac 0.12, refs #8638 and #9059.
This work is based on code contributed/tested by Itamar Ostricher and sika.
Had a hard time myself to understand the consequences of wiki rename in Trac 0.12 i.e. for attachments, but now I favor this approach, even regarding naming conventions.
So I preferred reparent_resource_tags
over rename_resource
because the
former is what we actually do while the latter has already been done, when
IWikiChangeListener
method wiki_page_renamed
is triggered. Other details
regarding the latest patch by Itamar have been discussed in #9059 before.
comment:4 Changed 13 years ago by
Cc: | Ryan J Ollos Michael Renzmann added; anonymous removed |
---|---|
Owner: | changed from Michael Renzmann to Steffen Hoffmann |
Status: | new → assigned |
No more removing and re-adding tags to wiki pages before/after move. Enjoy, and tell me, how it goes for you.
comment:5 Changed 13 years ago by
(In [10636]) TagsPlugin: A spurious self
argument slipped in into changeset [10632], refs #8638 and #9059.
As outlined by Odd (osimons) in comment 4 of #9059
the usual first argument self
is omitted from Interface
definitions
intentionally; cite:
Interface
class declarations in Trac (and plugins) are always defined without adding self to the template methods. It has no real functional meaning, other than established practice to specify the essence of the API without implementation details + prevent that someone by accident makes an instance of the Interface class and tries to call it (if so it should fail).
comment:6 Changed 13 years ago by
Type: | enhancement → defect |
---|
comment:7 follow-up: 8 Changed 13 years ago by
ok, current r11061 seems to work. Thanks for the work guys.
comment:8 Changed 13 years ago by
Replying to anonymous:
ok, current r11061 seems to work. Thanks for the work guys.
Thanks, your issue was related indeed. And thank you too for the ok-report afterwards, especially, because anonymous
have a tendency to only report bugs, and often they never come back again to respond/report on progress.
comment:9 Changed 12 years ago by
We just ran into this problem with an older version of trac-tags, and i can confirm that updating to the current svn resolved the problem for us.
Thanks for this work. I've submitted a new SVN snapshot to debian's unstable as well, fwiw.
Patch again 0.6 tag to make wiki_page_renamed work.