TracBackLinkPlugin for TRAC 1.4

13 views
Skip to first unread message

Clemens Feige

unread,
Jan 1, 2021, 9:30:56 AMJan 1
to trac-...@googlegroups.com
Hello and Happy New Year.

Are there any plans to make TracBackLinkPlugin compatible to Trac 1.4?

https://trac-hacks.org/wiki/TracBackLinkPlugin

We are currently planning migration from TRAC 1.2 to TRAC 1.4. But
unfortunately it seems that the TracBackLinkPlugin is not compatible to 1.4.

Shall I raise a ticket on that matter?

We really much appreciate this plugin. The back-reference are a great
enhancement because it helps to find important context information.
Without this plugin we would be forced to stick with Trac 1.2.

After installing the plugin in Trac 1.4 and running the upgrade command
the following error appears:

"trac-admin [snip] upgrade" fails due to "TypeError:
environment_needs_upgrade() takes exactly 2 arguments (1 given)"

I already learned that this is due to API changes in Trac 1.3, where the
db parameter has been removed from
IEnvironmentSetupParticipant.environment_needs_upgrade() in [14888].
Furthermore, I inspected the plugin code and found a bunch of import
statements for the deprecated Genshi templates.
However, unfortunately I cannot do much, because I neither have
knowledge about Python programming nor about Trac programming.

Any help would be greatly appreciated because we really love this plugin.

best regards
Clemens

RjOllos

unread,
Jan 1, 2021, 8:57:58 PMJan 1
to Trac Users
Yeah, it will take some work to make the plugin compatible with Jinja2 template. The HTML injection needs to be ported to JavaScript. I hope to use the plugin in a Trac 1.4 installation within the next 2 months, so I may make a patch if it's not ported before then.

Ryan

Clemens Feige

unread,
Jan 2, 2021, 9:01:14 AMJan 2
to Trac Users
RjOllos wrote on 02.01.2021 at 02:57:

On Friday, January 1, 2021 at 6:30:56 AM UTC-8 Clemens wrote:
Hello and Happy New Year.

Are there any plans to make TracBackLinkPlugin compatible to Trac 1.4?

https://trac-hacks.org/wiki/TracBackLinkPlugin

SNIP...


Any help would be greatly appreciated because we really love this plugin.

best regards
Clemens

Yeah, it will take some work to make the plugin compatible with Jinja2 template. The HTML injection needs to be ported to JavaScript. I hope to use the plugin in a Trac 1.4 installation within the next 2 months, so I may make a patch if it's not ported before then.

Ryan


Hello Ryan

It would be really great if you could update this ticket for Trac 1.4.

Meanwhile I have checked all of our other plugins. It turned out that indeed TracBackLinkPlugin is the only "blocker" for our desired migration to Trac 1.4. We like it so much because it helps with the typical problem: "It does not help to have information somewhere unless you are able to find it."

Of course I am offering myself as beta tester.

Thanks a lot
Clemens


Ryan Ollos

unread,
Jan 2, 2021, 1:37:37 PMJan 2
to Trac Users
Looks like Jun has updated the plugin.

Ryan 
Message has been deleted

Clemens Feige

unread,
Jan 3, 2021, 10:27:24 AMJan 3
to trac-...@googlegroups.com

Rob Hills wrote on 03.01.2021 at 03:15:
On Sunday, 3 January 2021 at 02:37:37 UTC+8 RjOllos wrote:

Shouldn't this line be changed from
    def environment_needs_upgrade(self, db):
to
    def environment_needs_upgrade(self, db=None):

I had to make this change to another plugin to stop it breaking my Trac 1.4.2 instance.

Hello

Good news. Thanks to Jun the TracBackLinkPlugin is now compatible with TRAC 1.4. I tested it and it works fine with my TRAC 1.4.2.

The corresponding ticket is now closed.
https://trac-hacks.org/ticket/13619

@Rob: Indeed, the new code (by Jun) is now:
  def environment_needs_upgrade(self, db=None):
...compare both revision:
https://trac-hacks.org/browser/tracbacklinkplugin/1.0/tracbacklink/api.py?rev=17027#L176
https://trac-hacks.org/browser/tracbacklinkplugin/1.0/tracbacklink/api.py?rev=17944#L176

Clemens

Rob Hills

unread,
Jan 3, 2021, 12:57:16 PMJan 3
to Trac Users
Yes, I noticed he'd done that, as well as a lot of other changes, which is why I quickly deleted my post as being unnecessary noise.  Not quickly enough obviously!
Reply all
Reply to author
Forward
0 new messages