You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Tags portlet (libs/portlets/dot-tags) does not surface the duplicate-detection information that PR #34604 added to the v2 Tags API. As a result:
Create dialog gives no feedback when a tag already exists. When a user submits a tag name that already exists, the backend now returns 200 OK with created: [] and the existing tag in duplicates[]. The frontend ignores the duplicates list, reloads the table, and shows nothing — the user cannot tell whether their tag was actually created or silently treated as a no-op.
Import dialog shows a misleading "success" toast on pure-duplicate imports. The import endpoint now returns a duplicateCount field separate from successCount. The frontend ignores duplicateCount and decides SUCCESS-vs-WARNING based only on failureCount === 0. Re-importing a CSV that contains only pre-existing tags shows a SUCCESS toast saying "0 tags imported" — exactly the misleading behavior the backend fix in [DEFECT] Tags v2 API silently accepts duplicate tags on both create and import endpoints #34548 was meant to eliminate.
Severity: Medium — tags get created/imported correctly, but the UX gives users wrong information about what happened.
DotTagsService.importTags() return type includes the new duplicateCount: number field
Store / list-component plumbing forwards the created and duplicates payload from createTag() to the UI layer (current handleTagAction discards it)
When a single-tag create returns created.length === 0 && duplicates.length === 1, the user sees an INFO toast (i18n key: tags.create.duplicate) stating that the tag already exists
When a batch create returns created.length > 0 && duplicates.length > 0, the user sees an INFO toast summarizing both counts (i18n key: tags.create.mixed)
When a single-tag create returns created.length === 1 && duplicates.length === 0, the user sees a SUCCESS toast (i18n key: tags.create.success)
failureCount === 0 && duplicateCount > 0 → INFO (new i18n key tags.import.with-duplicates, with placeholders for successCount, duplicateCount, totalRows)
failureCount > 0 → WARNING (existing tags.import.partial-success, extended to include duplicateCount placeholder)
All new i18n keys added to English Messages_en.properties; other locales filled or left untranslated per current repo convention
Unit tests added/updated in dot-tags.service.spec.ts, dot-tags-list.store.spec.ts, dot-tags-list.component.spec.ts, dot-tags-import.component.spec.ts covering: all-duplicate create, mixed create, all-duplicate import, mixed import
No regression in the existing happy path (all-new create and all-new import still behave as today)
dotCMS Version
Latest from main branch (verified against commit 8938aacf0c). PR #34604 was merged on 2026-02-17.
Problem Statement
The Tags portlet (
libs/portlets/dot-tags) does not surface the duplicate-detection information that PR #34604 added to the v2 Tags API. As a result:Create dialog gives no feedback when a tag already exists. When a user submits a tag name that already exists, the backend now returns
200 OKwithcreated: []and the existing tag induplicates[]. The frontend ignores theduplicateslist, reloads the table, and shows nothing — the user cannot tell whether their tag was actually created or silently treated as a no-op.Import dialog shows a misleading "success" toast on pure-duplicate imports. The import endpoint now returns a
duplicateCountfield separate fromsuccessCount. The frontend ignoresduplicateCountand decides SUCCESS-vs-WARNING based only onfailureCount === 0. Re-importing a CSV that contains only pre-existing tags shows a SUCCESS toast saying "0 tags imported" — exactly the misleading behavior the backend fix in [DEFECT] Tags v2 API silently accepts duplicate tags on both create and import endpoints #34548 was meant to eliminate.Severity: Medium — tags get created/imported correctly, but the UX gives users wrong information about what happened.
Affected files:
libs/data-access/src/lib/dot-tags/dot-tags.service.tscreateTag()return type isDotTag[](old shape);importTags()return type is missingduplicateCountlibs/portlets/dot-tags/src/lib/dot-tags-list/store/dot-tags-list.store.tshandleTagActiondiscards response — store cannot react tocreatedvsduplicateslibs/portlets/dot-tags/src/lib/dot-tags-list/dot-tags-list.component.tsduplicateCountlibs/portlets/dot-tags/src/lib/dot-tags-import/dot-tags-import.component.tsSteps to Reproduce
Create dialog (silent duplicate):
marketingon SYSTEM_HOSTmarketingagainImport dialog (misleading success):
abc1,abc2,abc3manuallyabc1,abc2,abc3failureCount === 0 → SUCCESS), claiming the import succeeded even though zero new tags were importedAcceptance Criteria
DotTagsService.createTag()return type is updated to{ created: DotTag[]; duplicates: DotTag[] }to match the response shape introduced by PR 34548 defect tags v2 api silently accepts duplicate tags on both create and import endpoints #34604DotTagsService.importTags()return type includes the newduplicateCount: numberfieldcreatedandduplicatespayload fromcreateTag()to the UI layer (currenthandleTagActiondiscards it)created.length === 0 && duplicates.length === 1, the user sees an INFO toast (i18n key:tags.create.duplicate) stating that the tag already existscreated.length > 0 && duplicates.length > 0, the user sees an INFO toast summarizing both counts (i18n key:tags.create.mixed)created.length === 1 && duplicates.length === 0, the user sees a SUCCESS toast (i18n key:tags.create.success)failureCount === 0 && duplicateCount === 0→ SUCCESSfailureCount === 0 && duplicateCount > 0→ INFO (new i18n keytags.import.with-duplicates, with placeholders forsuccessCount,duplicateCount,totalRows)failureCount > 0→ WARNING (existingtags.import.partial-success, extended to includeduplicateCountplaceholder)Messages_en.properties; other locales filled or left untranslated per current repo conventiondot-tags.service.spec.ts,dot-tags-list.store.spec.ts,dot-tags-list.component.spec.ts,dot-tags-import.component.spec.tscovering: all-duplicate create, mixed create, all-duplicate import, mixed importdotCMS Version
Latest from main branch (verified against commit
8938aacf0c). PR #34604 was merged on 2026-02-17.Severity
Medium - Some functionality impacted
Links
main @ 8938aacf0c