Taxonomy plugin does not work with an unpublished taxonomy

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Taxonomy plugin does not work with an unpublished taxonomy

Roberto van der Linden
Hello,

We are using the taxonomyplugin (1.07.00) and found the following bug:

When you open a document that has some linked taxonomy items and you have unpublished the taxonomy, you get a nice NullPointerException :)

Caused by: java.lang.NullPointerException
        at org.onehippo.taxonomy.plugin.CanonicalCategory.getName(CanonicalCategory.java:39)
        at org.onehippo.taxonomy.plugin.TaxonomyPickerPlugin$4.isVisible(TaxonomyPickerPlugin.java:220)
        at org.apache.wicket.Component.determineVisibility(Component.java:4684)
        at org.apache.wicket.Component.internalBeforeRender(Component.java:1055)
        at org.apache.wicket.Component.beforeRender(Component.java:1100)
        at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1757)
        ... 113 more

Do I need to configure the "taxonomy.state" property somewhere? Because it looks like that is used in TaxonomyPlugin.java to get the state?

Cheers,
Roberto
Reply | Threaded
Open this post in threaded view
|

Re: Taxonomy plugin does not work with an unpublished taxonomy

Frank van Lankvelt
On Tue, Dec 6, 2011 at 3:56 PM, Roberto van der Linden <[hidden email]> wrote:

> Hello,
>
> We are using the taxonomyplugin (1.07.00) and found the following bug:
>
> When you open a document that has some linked taxonomy items and you have
> unpublished the taxonomy, you get a nice NullPointerException :)
>
> Caused by: java.lang.NullPointerException
>        at
> org.onehippo.taxonomy.plugin.CanonicalCategory.getName(CanonicalCategory.java:39)
>        at
> org.onehippo.taxonomy.plugin.TaxonomyPickerPlugin$4.isVisible(TaxonomyPickerPlugin.java:220)
>        at org.apache.wicket.Component.determineVisibility(Component.java:4684)
>        at org.apache.wicket.Component.internalBeforeRender(Component.java:1055)
>        at org.apache.wicket.Component.beforeRender(Component.java:1100)
>        at
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1757)
>        ... 113 more
>
> Do I need to configure the "taxonomy.state" property somewhere? Because it
> looks like that is used in TaxonomyPlugin.java to get the state?
>
hmm, this indeed looks like a bug.  Other code handles the case where
a taxonomy cannot be found gracefully, but the model for the
CanonicalCategory appears to not be so resilient.
I've fixed the NPE in trunk and 1.07 branch; the 1.07.02 tag of the
taxonomy should behave better when the taxonomy cannot be found.

The taxonomy.state can indeed be used to select a particular workflow
state of the document to be used.  The default (only use published
variants) does appear to be safe.  It doesn't seem to use the same
fallback mechanism the rest of the CMS has when the taxonomy.state
would be set to 'unpublished', though.  Does anyone know more about
this?

cheers, Frank


> Cheers,
> Roberto
>
>
> --
> View this message in context: http://hippo.2275632.n2.nabble.com/Taxonomy-plugin-does-not-work-with-an-unpublished-taxonomy-tp7067063p7067063.html
> Sent from the Hippo CMS 7 mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html