Attempts to install the "Optilux Policy Site" using the code in chapter 8 of Martin Aspeli's book will fail with an error thrown by kupu, typically:
Request URL http://localhost:8082/optilux/portal_quickinstaller/installProducts Exception Type KupuError Exception Value Resource type: linkable, invalid type: RichDocument This problem is documented in Mr. Aspeli's documentation for RichDocument at http://plone.org/documentation/tutorial/richdocument/kupu and on this forum, but not in the book. In the Plone forums, people who encountered this problem recommended uninstalling the entire "optilux" Plone site, then reinstalling. That probably isn't enough. The kupu incompatibility needs to be fixed, too. My solution: In ZMI, uninstall the optilux site. Append the following to optilux/parts/productdistros/RichDocument/Extensions/Install.py (the RichDocument install script), at the end of the install function: # kupu tool reconfig, see http://plone.org/documentation/tutorial/richdocument/kupu kupuTool = getToolByName(self, 'kupu_library_tool') linkable = list(kupuTool.getPortalTypesForResourceType('linkable')) mediaobject = list(kupuTool.getPortalTypesForResourceType('mediaobject')) if 'FileAttachment' not in linkable: linkable.append('FileAttachment') if 'ImageAttachment' not in linkable: linkable.append('ImageAttachment') if 'RichDocument' not in linkable: linkable.append('RichDocument') if 'ImageAttachment' not in mediaobject: mediaobject.append('ImageAttachment') # kupu_library_tool has an idiotic interface, basically written purely to # work with its configuration page. :-( kupuTool.updateResourceTypes(({'resource_type' : 'linkable', 'old_type' : 'linkable', 'portal_types' : linkable}, {'resource_type' : 'mediaobject', 'old_type' : 'mediaobject', 'portal_types' : mediaobject},)) # end kupu reconfig Note that this differs slightly from the script on the RichDocument site. It takes into account recommendations from the comments. Run buildout. Run tests, just to be sure everything is working. Then-- Install the "optilux" site in ZMI. In the Site Setup: Add-on Products, add (in this order): Attachment Support RichDocument Optilux Site Policy Optilux Theme Mr. Aspeli does not make it altogether clear in his book that Attachment Support and RichDocument need to be added in this way. As far as I can tell, they do, or adding the Optilux Site Policy will throw an error. If you uninstall all these products, you evidently have to reinstall from scratch again--all the way back in ZMI. If you leave Attachment Support installed, you can apparently reinstall the products through Plone. I hope this proves useful. -- Paul -- View this message in context: http://n2.nabble.com/Kupu-Error-while-installing-RichDocument-tp2940897p2940897.html Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com. _______________________________________________ Setup mailing list [email protected] http://lists.plone.org/mailman/listinfo/setup
