Index: quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py
===================================================================
--- quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py	(revision 1934)
+++ quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py	(revision 2018)
@@ -1,6 +1,23 @@
 from zope.interface import Interface
 from zope.component import queryAdapter
-from plone.indexer.decorator import indexer
 
+#for compatibility with older plone versions 
+try:
+    from plone.indexer.decorator import indexer 
+    IS_NEW = True
+except:
+    IS_NEW = False
+    class IDummyInterface:pass
+    class indexer:
+
+         def __init__(self, *interfaces):
+            self.interfaces = IDummyInterface,
+
+         def __call__(self, callable):
+             callable = lambda *args, **kw:None
+             callable.__component_adapts__ = self.interfaces
+             callable.__implemented__ = Interface
+             return callable
+    
 from interfaces import ICanonicalPath
 from interfaces import ICanonicalLink
@@ -23,2 +40,8 @@
         return adapter.canonical_link
     return None
+
+#for compatibility with older plone versions 
+if not IS_NEW:
+    from Products.CMFPlone.CatalogTool import registerIndexableAttribute
+    map(registerIndexableAttribute, ('canonical_path', 'canonical_link'),
+                                    (canonical_path, canonical_link))
Index: quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py
===================================================================
--- quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py	(revision 1934)
+++ quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/tests.py	(revision 2018)
@@ -3,7 +3,17 @@
 from zope.testing import doctestunit
 from zope.component import testing
-from zope.component import queryAdapter, queryMultiAdapter
+from zope.component import queryAdapter, queryMultiAdapter, getMultiAdapter
 from zope.schema.interfaces import InvalidValue
-from plone.indexer.interfaces import IIndexableObject
+
+#for compatibility with older plone versions 
+try:
+    from plone.indexer.interfaces import IIndexableObject
+    IS_NEW = True
+except:
+    from plone.app.content.interfaces import IIndexableObjectWrapper \
+        as _old_IIndexableObjectWrapper
+    IS_NEW = False
+
+
 from Testing import ZopeTestCase as ztc
 
@@ -40,29 +50,45 @@
         self.logout()
 
+    def get_indexable_wrapper(self, obj):
+        if IS_NEW:
+            wrapper = None
+            if not IIndexableObject.providedBy(obj):
+                wrapper = queryMultiAdapter((obj, self.catalog), IIndexableObject)
+        else:
+            wf = getattr(self.portal, 'portal_workflow', None)
+            if wf is not None:
+                vars = wf.getCatalogVariablesFor(obj)
+            else:
+                vars = {}
+            wrapper = getMultiAdapter((obj, self.portal), _old_IIndexableObjectWrapper)
+            wrapper.update(vars)
+            
+        return wrapper and wrapper or obj
+
     def testForPortal(self):
-        wrapper = queryMultiAdapter((self.portal, self.catalog), IIndexableObject)
+        wrapper = self.get_indexable_wrapper(self.portal)
         self.assertFalse(wrapper is None, "No indexer registered for portal object")
 
     def testForAT(self):
-        wrapper = queryMultiAdapter((self.my_doc, self.catalog), IIndexableObject)
+        wrapper = self.get_indexable_wrapper(self.my_doc)
         self.assertFalse(wrapper is None, "No indexer registered for document object")
 
     def testCanonicalPathForPortal(self):
-        wrapper = queryMultiAdapter((self.portal, self.catalog), IIndexableObject)
+        wrapper =  self.get_indexable_wrapper(self.portal)
         self.assertTrue(hasattr(wrapper, 'canonical_path'),
             "'canonical_path' attribute not accessible with indexer wrapper for portal object")
 
     def testCanonicalPathForAT(self):
-        wrapper = queryMultiAdapter((self.my_doc, self.catalog), IIndexableObject)
+        wrapper = self.get_indexable_wrapper(self.my_doc)
         self.assertTrue(hasattr(wrapper, 'canonical_path'),
             "'canonical_path' attribute not accessible with indexer wrapper for Document object")
 
     def testCanonicalLinkForPortal(self):
-        wrapper = queryMultiAdapter((self.portal, self.catalog), IIndexableObject)
+        wrapper = self.get_indexable_wrapper(self.portal)
         self.assertTrue(hasattr(wrapper, 'canonical_link'),
             "'canonical_link' attribute not accessible with indexer wrapper for portal object")
 
     def testCanonicalLinkForAT(self):
-        wrapper = queryMultiAdapter((self.my_doc, self.catalog), IIndexableObject)
+        wrapper = self.get_indexable_wrapper(self.my_doc)
         self.assertTrue(hasattr(wrapper, 'canonical_link'),
             "'canonical_link' attribute not accessible with indexer wrapper for Document object")
