Red Hat Bugzilla – Bug 109963
Unable to create an instance of the ContentItemPortlet
Last modified: 2007-04-18 12:59:26 EDT
Description of problem:
When trying to add a 'Content Item' to a portal, an NPE is thrown when
submitting the form. If i remove the '/ccm' prefix on the path to the
item, the NPE goes away, but it simply says 'cannot find contnet item'
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create an item 'foo' in /content/
2. Publsh the item
3. Add a content item portlet, entering /ccm/content/foo.en as the
The portlet is added.
Relevant stack trace:
Looks like the underlying impl of ContentSection.getSectionFromNode
has changed, and no longer throws a DataObjectNotFoundException;
instead the section is returned null, leading to the NPE.
I implemented a partial fix @39176. All this does is check if the
dispatcher prefix exists, and, if so, removes it.
The other issue that needs to be resolved is support for multilingual
content items/URLs -- I just noticed your example above, and that case
isn't handled right now.
@39177 switches to using the MultilingualItemResolver.
Dan, does this fix the problems?
In the short term yes. Ideally we should be calling
ContentSection#getItemResolver IIRC to return the currently configured
item resolver for the section.