Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

AdminApp: Previously selected categories and tags are not shown when editing an item

« Go Back

Information

 
Article Number000097916
EnvironmentProduct: Sitefinity
Version: 11.x, 12.x
OS: All supported OS versions
Database: All supported Microsoft SQL Server versions
Question/Problem Description
When an item is opened for editing, the previously selected categories and tags are not shown in the new interface. The issue is observed only for a certain set of items. Errors with messages "Cannot read property 'isTranslated' of undefined" and "Cannot read property 'isSeparator' of undefined" are present in the browser console.
Steps to Reproduce
Clarifying Information
Error MessageCannot read property 'isTranslated' of undefined
TypeError: Cannot read property 'isTranslated' of undefined
at Object.eval [as updateDirectives] (ng:///e/e.ngfactory.js:235:43)
at Object.updateDirectives (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:241805)
at Ch (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:233585)
at Nh (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:240212)
at Oh (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:239875)
at Ch (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:233607)
at Nh (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:240212)
at Oh http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:239875)
at Ch (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:233607)
at Nh (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:240212)

Cannot read property 'isSeparator' of undefined
TypeError: Cannot read property 'isSeparator' of undefined
at http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:785096
at Array.filter (<anonymous>)
at C.countActualTaxons (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:785068)
at C.addMenuItems (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:780191)
at C.addMenuItemsAndUpdateRecentTaxa (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:779924)
at t._next (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:779570)
at t.__tryOrUnsub (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:265856)
at t.next (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:265001)
at t._next (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:264053)
at t.next (http://<site domain>/adminapp/app.9b6aee21911e0be99bdc.bundle.js:1:263724)
Defect/Enhancement Number
Cause
Some of the linked tags and categories are no longer present. The database entries for the relation between the tags/categories and the content item are still present.
Resolution
The below resolution is applied for the blog posts content type. For other content types, use the corresponding tables for the relation between the content type and tags/categories (e.g. sf_blog_posts_tags and sf_blog_posts_category).

Note: Ensure to create a database backup before performing the below steps:

1. Check if there are orphan entries for the relation between the content type and the tags/categories using the following queries:
SELECT *
FROM sf_blog_posts_category
WHERE val NOT IN (SELECT id
  FROM sf_taxa)

*
FROM sf_blog_posts_tags
WHERE val NOT IN (SELECT id
  FROM sf_taxa)
If the above queries return results, it would indicate that there are orphan records. In order to resolve the issue, remove the orphan records by performing the steps below:

2. Delete the taxonomy statistics for the missing tags and categories using the following queries:
DELETE
FROM sf_taxonomy_statistic
WHERE taxon_id IN (SELECT val
  FROM sf_blog_posts_tags
  WHERE val NOT IN (SELECT id
    FROM sf_taxa))

DELETE
FROM sf_taxonomy_statistic
WHERE taxon_id IN (SELECT val
  FROM sf_blog_posts_category
  WHERE val NOT IN (SELECT id
    FROM sf_taxa))
3. Delete the relation entries by executing the following queries:
DELETE
FROM sf_blog_posts_category
WHERE val NOT IN (SELECT id
  FROM sf_taxa)

DELETE
FROM sf_blog_posts_tags
WHERE val NOT IN (SELECT id
  FROM sf_taxa)
4. Restart the application
Workaround
Notes
Attachment 
Last Modified Date8/14/2019 6:23 AM