Foros de discusión

AssetTag - overriding default group ID

Jan Tošovský, modificado hace 8 años.

AssetTag - overriding default group ID

Liferay Master Mensajes: 566 Fecha de incorporación: 22/07/10 Mensajes recientes
Dear All,

I use scope feature for encapsulating the content within the portal. E.g. two scoped Wikis, each in a different portal section (page), have their own content.

But if a new tag is created using a default aui tag, it is stored with incorrect group ID (site group ID instead of scope group ID).
<aui:input classPK="<%= myEntity.getClassPK()%>" name="tags" type="assetTags" />


This behaviour has an impact on tag cloud, which doesn't show any tags when placed on the scoped page. The tag cloud is based on 'assettagstats' database table. When it is updated, the number of entries that are linked to that tag is determined. But when asset entries are fetched, their group ID is supposed to match the tag group ID, which is not the case so the number of zero is returned.

Storing all tags in the same group has advantages as there won't be any duplicates. On the other hand it can lead to huge tag database inappropriate for the given scope.

Is that tag group ID behaviour a feature or rather a bug?

Is there a way how to pass the proper scope group ID to the taglib?

Thanks, Jan
Jan Tošovský, modificado hace 8 años.

RE: AssetTag - overriding default group ID (Respuesta)

Liferay Master Mensajes: 566 Fecha de incorporación: 22/07/10 Mensajes recientes
Further investigation revealed:
(1) Tag Cloud is not directly linked to assettagstats database table
(2) Tag Cloud works fine when its scope is set the the same scope of the content.

In the original case I set custom asset type filter, but there wasn't any tags for this type in the default site group, hence no entries were displayed in the tag cloud.

So the conclusion is I don't need to set the proper group ID when creating tags, but this group ID must be set in the Tag Cloud configuration. It also means all site tags are visible in the particular scope (and there is no easy way to make a scope-wide subset).

Jan