Modify ↓
Opened 12 years ago
Closed 11 years ago
#11152 closed defect (fixed)
Tags are not supported on the 'wiki' realm
Reported by: | Ryan J Ollos | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | |
Cc: | osimons | Trac Release: | 1.0 |
Description
I've seen this error a few times this evening, and just now when trying to navigate to the FootNoteMacro. After two page refreshes, I no longer saw the error and the page loaded.
2013-06-06 11:48:16,239 Trac[main] WARNING: [184.78.149.240] HTTPInternalError: 500 Trac Error (Tags are not supported on the 'wiki' realm)
Sometimes it is accompanied by a traceback in the logs,
2013-06-06 12:01:15,188 Trac[formatter] ERROR: Macro ListTagged(lucky) failed: Traceback (most recent call last): File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 765, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 356, in process text = self.processor(text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/Trac-1.0.1-py2.6.egg/trac/wiki/formatter.py", line 343, in _macro_processor text) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.7dev_r13235-py2.6.egg/tractags/macros.py", line 231, in expand_macro results = sorted(query_result, key=lambda r: \ File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.7dev_r13235-py2.6.egg/tractags/api.py", line 210, in query providers.add(self._get_provider(realm)) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracTags-0.7dev_r13235-py2.6.egg/tractags/api.py", line 380, in _get_provider % realm) InvalidTagRealm: Tags are not supported on the 'wiki' realm
Attachments (0)
Change History (5)
comment:1 Changed 12 years ago by
comment:2 Changed 11 years ago by
TagSystem._realm_provider_map
is rarely empty on multi-thread. At least, we should use it after it is fully initialized.
-
tractags/api.py
366 366 367 367 def _populate_provider_map(self): 368 368 if self._realm_provider_map is None: 369 self._realm_provider_map = {}370 for provider in self.tag_providers:371 self._realm_provider_map[provider.get_taggable_realm()] = \372 provider369 # use the "map" variable once it is fully initialized 370 map = dict((provider.get_taggable_realm(), provider) 371 for provider in self.tag_providers) 372 self._realm_provider_map = map 373 373 374 374 def _get_provider(self, realm): 375 375 self._populate_provider_map()
Note: See
TracTickets for help on using
tickets.
Since TagsPlugin has a non-thread-safe issue (#10636), this might hit here. This is yet a guess, because rendering of a TagsPlugin macro is involved.
Plan: I'll fix that ASAP, and we'll see, how it goes.