I hit this error on our instance of Plone 4.3.2 by going to:
Site setup > Dexterity Content Types > (selecting a type) > Fields tab > Edit XML Model
Here's the full error:
We’re sorry, but there seems to be an error…
Here is the full error message:
Display traceback as text
Traceback (innermost last):
Module ZPublisher.Publish, line 70, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module Products.Five.browser.metaconfigure, line 479, in __call__
Module Products.Five.browser.pagetemplatefile, line 125, in __call__
Module Products.Five.browser.pagetemplatefile, line 59, in __call__
Module zope.pagetemplate.pagetemplate, line 126, in pt_render
Warning: Compilation failed
Warning: exceptions.KeyError: u'Undefined namespace prefix: i18.'
PTRuntimeError: ['Compilation failed', "exceptions.KeyError: u'Undefined namespace prefix: i18.'"]
I haven't been able to find something useful about this error on the web, but #eleddy mentioned it's a common Plone problem and all I need to do is upgrade something something to fix it. Anyone know what the "something something" is? Thanks!
If it's useful, here is what is currently installed on our Plone instance:
Plone 4.3.2 (4307)
CMF 2.2.7
Zope 2.13.21
Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
PIL 1.7.8 (Pillow)
And add-ons...
Content portlet 1.8.1
ContentWellPortlets 4.2.1
Dexterity Content Types 2.0.9
Diazo theme support 1.1.1
Dropdown menu 2.3.1
FacultyStaffDirectory 3.1.3
HTTP caching support 1.1.6
Membrane: content-based users and groups 2.1.11
Plone Classic Theme 1.3.2
Plone JQuery Integration 1.7.2
Plone JQuery Tools Integration 1.5.6
Plone Keyword Manager 2.1
Plone Quick Upload 1.6.5
PloneFormGen 1.7.15
Relations 0.9b1
Twitter portlet 0.10
jQuery UI 1.10.1.2
plone.app.collection 1.0.11
This was a bug in Dexterity that was already fixed (https://github.com/plone/plone.app.dexterity/commit/4e3d4f8fa029662a089c3f01cf6401d34b84336e). Upgrading to plone.app.dexterity 2.0.11 should fix it.
Related
On a vanilla Plone 4.3.4 site (Unified Installer on Ubuntu 14.04.1LTS), and after updating buildout.cfg with the zopeskel and paster boiler plate stuff and running buildout, I successfully created a dexterity package in my src folder:
$ cd src
$ ../bin/zopeskel dexterity my.package
After updating buildout.cfg (adding my.package to the eggs section and src/my.package to the develop section) and running buildout, I tried to add content to my new package, like I have done so many times in Plone 4.3.3 and earlier versions:
$ cd my.package
$ ../../bin/paster addcontent dexterity_content
This results in the following error message:
Traceback (most recent call last):
File "../../bin/paster", line 260, in <module>
sys.exit(paste.script.command.run())
File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 104, in run
invoke(command, command_name, options, args[1:])
File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 143, in invoke exit_code = runner.run(args)
File "/home/Plone434_site/buildout-cache/eggs/PasteScript-1.7.5-py2.7.egg/paste/script/command.py", line 238, in run
result = self.command()
File "/home/Plone434_site/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/localcommands/__init__.py", line 70, in command
self._extend_templates(templates, args[0])
File "/home/Plone434_site/buildout-cache/eggs/ZopeSkel-2.21.2-py2.7.egg/zopeskel/localcommands/__init__.py", line 204, in _extend_templates tmpl = entry.load()(entry.name)
File "/home/Plone434_site/buildout-cache/eggs/setuptools-7.0-py2.7.egg/pkg_resources.py", line 2184, in load ['__name__'])
ImportError: No module named dexterity.localcommands.dexterity
Doing exactly the same on a Plone 4.3.3 site works just fine.
When I run the following:
$ ../../bin/paster addcontent -l
I get the following warning messages:
Warning: could not load entry point dexterity_behavior (ImportError: No module named dexterity.localcommands.dexterity)
Warning: could not load entry point dexterity_content (ImportError: No module named dexterity.localcommands.dexterity)
Available templates:
No template
I am wondering if this is somehow related to Plone 4.3.4 using setuptools 7.0, while previous versions used 0.7.2
Any advice to resolve this issue would be much appreciated.
I'm migrating a website from Plone 3.3.1 to Plone 4.3. The migration actually worked fine with no errors, but when I tried to update PloneFormGen to the current version (1.7.8), I get this:
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 580, in installProducts
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 512, in installProduct
- __traceback_info__: ('PloneFormGen',)
Module Products.GenericSetup.tool, line 350, in runAllImportStepsFromProfile
- __traceback_info__: profile-Products.PloneFormGen:default
Module Products.GenericSetup.tool, line 1100, in _runImportStepsFromContext
Module Products.GenericSetup.tool, line 1015, in _doRunImportStep
- __traceback_info__: pleonformgen
Module Products.PloneFormGen.setuphandlers, line 79, in importVarious
Module Products.PloneFormGen.setuphandlers, line 34, in update_kupu_resources
AttributeError: getPortalTypesForResourceType
Any thoughts? I saw something about Kupu having old references to linkable types, but I think this might be a different problem. I checked through my linkable resource types and they all seem to be the standard ones.
Thanks!
I suggest you check the "Resource Types" in the Visual Editor configlet on the Plone 3.3 side. Make sure it doesn't refer to any types that are either not installed or won't be available in 4.3. You may be able to eliminate the uninstalled types simply by saving the config.
And, make sure that PFG you upgrade to is 1.7.11+. There's a security advisory covering 1.7.8 and earlier.
here is my traceback from a Plone 4.2.1 installation (on SuSE Linux):
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module OFS.ObjectManager, line 620, in manage_importObject
Module OFS.ObjectManager, line 638, in _importObjectFromFile
Module ZODB.ExportImport, line 92, in importFile
Module transaction._transaction, line 260, in savepoint
Module transaction._transaction, line 257, in savepoint
Module transaction._transaction, line 690, in __init__
Module ZODB.Connection, line 1123, in savepoint
Module ZODB.Connection, line 587, in _commit
Module ZODB.ExportImport, line 176, in _importDuringCommit
AttributeError: 'module' object has no attribute 'NavigationViewlet'
The strange thing, that I do not understand is, why only one Plone Site shows this error during import into an instance newer than Plone 4.1.5?
The Plone site has only the following additional plugins/products installed (as others too, but they all work fine):
LinguaPlone
PloneFormGen
Products.ZSyncer
collective.quickupload
So, where is my mistake/error?
Thanx for any help, because the site is too big now to "rebuild" it in a new Plone instance from scratch :-(
The plone.app.layout.viewlets.links.NavigationViewlet was removed in plone.app.layout version 2.2 (see this entry into the HTML5 PLIP and this commit).
ZEXP imports into different version stacks are generally fraught with problems, exactly because of changing persistent object locations. You'll have to import to an earlier version of the software stack, then follow the regular Plone upgrade path to bring yourself up to a more recent version of Plone.
The upgrade scripts take care of removing references to removed viewlets like these, for example.
This is a general question but motivated by an example. The general question is: How to clean Plone sites from unused add-ons? You can generate an unused add-on in several ways, for example if you use one add-one for one thing and later you prefer another.
I'm starting learning about Plone and maybe I'm making some mistakes. But I think that some add-ons can make problems because they left some things that are not automatically uninstalled. Then my question is also about how to isolate the data from the possible add-ons footprints.
So, this is the example:
When I started with Plone I installed an add-on named zettwerk.ui. But later I uninstalled it. I removed the add-on using the Plone web interface and the buildout configuration. Then I got the problem: every time that I try to install another add-on an error message appears:
2012-04-28 00:21:54 INFO GenericSetup.rolemap Role / permission map imported.
2012-04-28 00:21:54 INFO GenericSetup.archetypetool Archetype tool imported.
2012-04-28 00:21:54 INFO GenericSetup.browserlayer Browser layers imported
2012-04-28 00:21:54 INFO GenericSetup.resourceregistry KSS registry imported.
2012-04-28 00:21:54 ERROR GenericSetup Step zettwerk.ui.disable_sunburst_patch has an invalid import handler
2012-04-28 00:21:54 INFO GenericSetup.rolemap Role / permission map imported.
2012-04-28 00:21:54 INFO GenericSetup.toolset Class zettwerk.ui.tool.tool.UITool not found for tool portal_ui_tool
2012-04-28 00:21:54 ERROR Zope.SiteErrorLog 1335586914.990.0334188015457 http://localhost:8080/Plone/portal_quickinstaller/installProducts
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 46, in call_object
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 575, in installProducts
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 512, in installProduct
- __traceback_info__: ('plone.app.theming',)
Module Products.GenericSetup.tool, line 323, in runAllImportStepsFromProfile
- __traceback_info__: profile-plone.app.theming:default
Module Products.GenericSetup.tool, line 1080, in _runImportStepsFromContext
Module Products.GenericSetup.tool, line 994, in _doRunImportStep
- __traceback_info__: toolset
Module Products.GenericSetup.tool, line 123, in importToolset
TypeError: 'NoneType' object is not callable
> /home/daniel/.buildout/eggs/Products.GenericSetup-1.6.3-py2.6.egg/Products/GenericSetup/tool.py(123)importToolset()
-> new_tool = tool_class(tool_id)
I put zettwerk.ui back in buildout.conf and then the error disappears. But I think that the solution is not clean. So, how can I remove zettwerk.ui from buildout without making problems?
This has been fixed in GenericSetup 1.6.5:
http://pypi.python.org/pypi/Products.GenericSetup/1.6.5
Updating to that version (included in Plone 4.1.4) should do the trick.
(Latest stable release currently is Plone 4.1.5 with GenericSetup 1.6.6, so I would say go for that one.)
Explanation: during install, zettwerk.ui has told GenericSetup that it requires a tool. This tool is then created. During uninstall, the tool is removed, but it is still in the list of required tools. If zettwerk.ui is uninstalled but the package is still in your buildout and you install another add-on, then GenericSetup looks at the list of required tools and creates this tool again. When zettwerk.ui is not available, this will fail with the above error. GenericSetup 1.6.5 simply prints a warning in this case and happily continues.
I don't think wildcard.fixpersistentutilities works in this case, but I may be mistaken. For some reason I have so far managed to avoid needing that package.
There are two possibilities.
First, do a backup :-)
Simplest, if the zettwerk.ui product you reinstalled is not the same version as the one you originally added, try reinstalling it. Product removal has been much improved over the years, and fewer products now exhibit this behavior.
If you still have the problem, add the product wildcard.fixpersistentutilities to your buildout, rerun the buildout, and navigate to /##fix-persistent-utilities on your site, looking for anything on that page that references zettwerk.ui. Remove it. Once you have no more references there, remove the zettwerk.ui product.
Actually, there's a third possibility: add a patch to zettwerk.ui to fix its uninstall!
Whenever I try to access "User and Groups" in Plone Site Setup, I'm getting the following error :
Traceback (innermost last):
Module ZPublisher.Publish, line 127, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 47, in call_object
Module plone.app.controlpanel.usergroups, line 211, in __call__
Module plone.app.controlpanel.usergroups, line 270, in doSearch
KeyError: 'adminusername'
This plone instance has previously been upgraded from Plone 3 to Plone 4. Users and Groups used to work. A new blank Plone instance created in the same Zope allows access to Users and Groups.
Versions used are :
Plone 4.0.7
Zope 2.12.18
Python 2.6.5 (r265:79063, Nov 23 2010, 02:02:03) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
Check your logs very carefully. I'm doing a lot of work with PAS plugins right now, and I'm seeing similar sorts of errors when adapters/subscribers are misconfigured, but the errors they generate are masked by the form error above. Look at the error immediately before this one.