#13619 closed defect (fixed)
1 failure on Trac 1.4
| Reported by: | Jun Omae | Owned by: | Jun Omae |
|---|---|---|---|
| Priority: | normal | Component: | TracBackLinkPlugin |
| Severity: | normal | Keywords: | patch |
| Cc: | stei, clemens | Trac Release: | 1.4 |
Description
$ ~/venv/trac/1.4/bin/python setup.py test
running test
running egg_info
writing requirements to TracBackLinkPlugin.egg-info/requires.txt
writing TracBackLinkPlugin.egg-info/PKG-INFO
writing top-level names to TracBackLinkPlugin.egg-info/top_level.txt
writing dependency_links to TracBackLinkPlugin.egg-info/dependency_links.txt
writing entry points to TracBackLinkPlugin.egg-info/entry_points.txt
reading manifest file 'TracBackLinkPlugin.egg-info/SOURCES.txt'
writing manifest file 'TracBackLinkPlugin.egg-info/SOURCES.txt'
running build_ext
test_attachment_links (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_changeset_links_cached_repository (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_changeset_links_non_cached_repository (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_milestone_links (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_ticket_links (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_wiki_links (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_wiki_syntax (tracbacklink.tests.api.GatherLinksTestCase) ... ok
test_attachment (tracbacklink.tests.api.ChangeListenersTestCase) ... ok
test_changeset_with_cached_repos (tracbacklink.tests.api.ChangeListenersTestCase) ... ok
test_changeset_with_non_cached_repos (tracbacklink.tests.api.ChangeListenersTestCase) ... ok
test_milestone (tracbacklink.tests.api.ChangeListenersTestCase) ... ok
test_ticket (tracbacklink.tests.api.ChangeListenersTestCase) ... ok
test_wiki_page (tracbacklink.tests.api.ChangeListenersTestCase) ... FAIL
======================================================================
FAIL: test_wiki_page (tracbacklink.tests.api.ChangeListenersTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jun66j5/src/tracbacklinkplugin/tracbacklink/tests/api.py", line 570, in test_wiki_page
self._verify_sets(expected, self._db_query())
File "/home/jun66j5/src/tracbacklinkplugin/tracbacklink/tests/api.py", line 463, in _verify_sets
self.assertEqual(s1 - (s1 & s2), s2 - (s1 & s2))
AssertionError: Items in the first set but not the second:
('ticket', '44', None, None, 'comment', '2', 'wiki', 'SandBox/NewPage')
('wiki', 'TracInstall', None, None, 'wiki', 'SandBox/NewPage', None, None)
Items in the second set but not the first:
(u'wiki', u'TracIni', None, None, u'wiki', u'SandBox/NewPage', None, None)
----------------------------------------------------------------------
Ran 13 tests in 0.391s
FAILED (failures=1)
Attachments (1)
Change History (17)
comment:1 Changed 5 years ago by
comment:2 Changed 5 years ago by
Trac 1.4 support request in gmessage:trac-users:LOD6v74NxEw/PGn8IBacBwAJ.
comment:3 Changed 5 years ago by
| Cc: | clemens added |
|---|
comment:5 follow-up: 7 Changed 5 years ago by
Replying to Jun Omae:
changeset:17944: compatible with Trac 1.4 (closes #13619)
Hello Jun
Many many thanks for making TracBackLinkPlugin version 1.0.11 compatible with Trac 1.4. After testing your changes I can confirm that it works well with Trac 1.4.2. Great!
However, with changeset:17944 there seems to be an installation issue. The file base.js is missing, it is not being installed with PIP.
This is the error message:
2021-01-01 01:06:01,000 Trac[chrome] WARNING: File base.js not found in any of ['/usr/local/lib/python2.7/dist-packages/tracbacklink/htdocs'] 2021-01-01 01:06:01,078 Trac[main] WARNING: [127.0.0.1] HTTPNotFound: 404 Not Found (File base.js not found), <RequestWithSession "GET '/chrome/tracbacklink/base.js'">, referrer 'http://localhost:8000/testrepo/ticket/3'
I managed to work around this by manually downloading the missing base.js into /usr/local/lib/python2.7/dist-packages/tracbacklink/htdocs. I guess that you forgot to include the new base.js file in the python setup. I am not a python programmer, but I guess that in setup.py the package_data argument needs to include something like htdocs/*.js. Am I right?
Clemens
comment:7 follow-up: 8 Changed 5 years ago by
Replying to clemens:
However, with changeset:17944 there seems to be an installation issue. The file
base.jsis missing, it is not being installed with PIP.
Thanks for the testing and reporting, Clemens. Your suggestion is correct. Fixed in r17948.
comment:8 Changed 5 years ago by
comment:9 follow-ups: 10 12 Changed 5 years ago by
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
The following error is reported at mailing list, https://groups.google.com/d/msgid/trac-users/581d4f61-ee12-bf33-90bb-cac9b6eb59d2%40osypkamed.com.
After upgrading my site from TRAC 1.2.3 to 1.4.2 the TracBackLinkPlugin is causing mysterious "Trac Oops" errors when viewing some ticket or wiki pages (but only on some of them).
File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 639, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 252, in dispatch
resp = self._post_process_request(req, *resp)
File "/usr/local/lib/python2.7/dist-packages/trac/web/main.py", line 495, in _post_process_request
resp = f.post_process_request(req, *resp[:-1])
File "/usr/local/lib/python2.7/dist-packages/tracbacklink/web_ui.py", line 100, in post_process_request
if type_ else None
File "/usr/local/lib/python2.7/dist-packages/tracbacklink/web_ui.py", line 156, in _get_backlinks_content
rendered = self._render_backlinks(req, sources)
File "/usr/local/lib/python2.7/dist-packages/tracbacklink/web_ui.py", line 206, in _render_backlinks
rendered.update(f(req, sources))
File "/usr/local/lib/python2.7/dist-packages/tracbacklink/web_ui.py", line 323, in _render_repository_backlinks
rendered(' ' if idx else u' \u2013 ', item)
comment:10 Changed 5 years ago by
Replying to Jun Omae:
The following error is reported at mailing list,
https://groups.google.com/d/msgid/trac-users/581d4f61-ee12-bf33-90bb-cac9b6eb59d2%40osypkamed.com.After upgrading my site from TRAC 1.2.3 to 1.4.2 the TracBackLinkPlugin is causing mysterious "Trac Oops" errors when viewing some ticket or wiki pages (but only on some of them).
Just for the records: The particular error message is as follow:
Oops... Trac detected an internal error: TypeError: 'Fragment' object is not callable
Surprising this error does not trigger on all tickets or wiki pages. Only some of them cause the error (maybe 25% of them). Other tickets and wiki page work fine and I can see the desired "Back Link" box. This tells me that the plugin is basically working. So far I could not see a pattern.
comment:11 Changed 5 years ago by
Just for the records: Ryan has opened a new TRAC ticket in scope of this issue: trac:#13343
Changed 5 years ago by
| Attachment: | tracbacklinkplugin-r17954.diff added |
|---|
patch by Jun Omae for Oops... Trac detected an internal error: TypeError: 'Fragment' object is not callable
comment:12 Changed 5 years ago by
| Keywords: | patch added |
|---|
Replying to Jun Omae:
The following error is reported at mailing list, https://groups.google.com/d/msgid/trac-users/581d4f61-ee12-bf33-90bb-cac9b6eb59d2%40osypkamed.com.
After upgrading my site from TRAC 1.2.3 to 1.4.2 the TracBackLinkPlugin is causing mysterious "Trac Oops" errors when viewing some ticket or wiki pages (but only on some of them).
In the mailing list Jun has submitted a patch for above error. I tested it and it works. No more "Trac Oops" anymore. Good job!
I do not understand the internals of this patch. But since it is obviously an improvement, I propose to accept it for the TracBackLinkPlugin.
comment:14 Changed 22 months ago by
| Cc: | stei added |
|---|
comment:15 Changed 22 months ago by
| Cc: | clemens removed |
|---|
comment:16 Changed 22 months ago by
| Cc: | clemens added |
|---|



The plugin uses Genshi transformer. Do you think it will eventually be made compatible with Jinja2?