Modify

Opened 4 years ago

Closed 3 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: Odd Simon Simonsen 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 4 years ago by Steffen Hoffmann

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.

comment:2 Changed 4 years ago by Jun Omae

TagSystem._realm_provider_map is rarely empty on multi-thread. At least, we should use it after it is fully initialized.

  • tractags/api.py

     
    366366
    367367    def _populate_provider_map(self):
    368368        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                     provider
     369            # 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
    373373
    374374    def _get_provider(self, realm):
    375375        self._populate_provider_map()
Last edited 4 years ago by Jun Omae (previous) (diff)

comment:3 Changed 4 years ago by Steffen Hoffmann

Thank you for the idea. I'll test it.

comment:4 Changed 4 years ago by Steffen Hoffmann

In 13278:

TagsPlugin: Provide a more thread-safe map of taggable realms, refs #11152.

This change has been kindly contributed by Jun Omae.

comment:5 Changed 3 years ago by Steffen Hoffmann

Resolution: fixed
Status: newclosed

In 13815:

TagsPlugin: Completing preparation for v0.7 release.

Availability of that code as stable, tagged release
closes #2429, #3359, #3610, #3624, #3677, #3754, #3864, #3947, #3983, #4078, #4277, #4503, #4799, #5523, #7787, #7857, #8638, #9057, #9058, #9059, #9060, #9061, #9062, #9063, #9149, #9210, #9521, #9630, #9636, #10032, #10416, #10636, #11096, #11147, #11152, #11274, #11302, #11658 and #11659.

Additionally there are some issues and enhancement requests showing progress,
but known to require more work to resolve them satisfactorily, specifically
refs #2804, #4200, #8747 and #9064.

Thanks to all contributors and followers, that enabled and encouraged a good
portion of this development work.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.