Ticket #12104 (closed Bug: fixed)

Opened 5 years ago

Last modified 4 years ago

plone.app.linkintegrity no longer supports 'resolveuid' URLs

Reported by: mattss Owned by: mj
Priority: major Milestone: 4.x
Component: General Version: 4.1
Keywords: Cc: hillsy


The 'findObject' method in plone.app.linkintegrity.handlers relied on the old 'resolveuid' script from TinyMCE/kupu. This has now been removed in favour of the plone.outputfilters 'resolveuid' browser view, which the aforementioned method does not support.

This means that links inserted into body content with TinyMCE using UIDs are not picked up by the link integrity checker.

Change History

comment:1 Changed 5 years ago by hillsy

  • Cc hillsy added

comment:2 Changed 5 years ago by mattss

As an update, here is my monkey-patch for findObject that restores 'resolveuid' support using plone.outputfilters:

# Monkeypatch linkintegrity to support resolveuid
def patched_findObject(base, path):
   from plone.outputfilters.browser.resolveuid import uuidToObject
   from plone.outputfilters.filters.resolveuid_and_caption import resolveuid_re
   from plone.app.linkintegrity import handlers
   if 'resolveuid' in path:
      subpath = path[path.index('resolveuid'):]
      match = resolveuid_re.match(subpath)
      if match is not None:
         uid, _subpath = match.groups()
         return uuidToObject(uid), path

   # fall back to old way
   return handlers._old_findObject(base, path)

comment:3 Changed 4 years ago by mj

  • Owner set to mj
  • Status changed from new to assigned
  • Version set to 4.1
  • severity set to Untriaged

I ran into the same issue, and came up with a different patch. I'll see about merging our two approaches into plone.app.linkintegrity.

comment:4 Changed 4 years ago by mj

Note that plone.outputfilters has only been introduced in Plone 4.1, yet the resolveuid handling already doesn't work in Plone 4.0. A solution to resolve UIDs will need to work in all versions supported by .linkintegrity.

comment:5 Changed 4 years ago by mj

  • Status changed from assigned to closed
  • Resolution set to fixed

Fixed in GitHub commit  0f0e508. A new release will be cut (1.4.5) with the next Plone 4.1 or 4.2 release.

Also ported to the 1.3 branch in  03e2bcf3b7; a 1.3.4 release, if made, would include this fix.

comment:6 Changed 4 years ago by davisagli

  • Component changed from Infrastructure to General
Note: See TracTickets for help on using tickets.