help.axcms.netAxinom Logo
Save Save Chapter Send Feedback
KB10035: Categories out of sync
There are some cases when categories are out of sync. DB state and application state or MS vs LS.

SYMPTOMS

A) You changed something in the table AxCategory manually. Now AxCMS.net shows the category tree incorrectly (i. e. categories in wrong order, not all categories visible, etc.)

B) You changed and published navigation, but the changes are not visible in the live system

C) There are categories in LS which are "never published" in MS or there are categories, which are "published" in MS but not existing in the LS

CAUSES

A) AxCMS.net maintains internally a redundant data structure which speeds up the access to categories: AxCategoryTree. If you haven't updated it as well, things can go wrong.

B) Probably the navigation cache in the LS was not reloaded

C) Possible cause is an error during publishing

SOLUTION

A) Update the table AxCategoryTree manually. There is a stored procedure for this:

EXECUTE dbo.GenerateCategoryTree

Please execute this procedure every time you make changes to the category tree manually.

B) Touch the file publish.category.cache in the Live System's publish directory (for example, add a space somewhere). After this the navigation should be visible. Normally this file is touched automatically on every publishing of categories/navigation.

C) These SQL statements can help you to detect wrong entries. Suppose the databases for Management System and for Live System are installed on the same server and have the names  AxCMS_BaseName and AxCMS_Live_BaseName respectively.

Find all categories, existing in the Live System, but marked as never published in the Management System

SELECT LC.*
FROM AxCMS_Live_BaseName..AxCategory LC
WHERE LC.CategoryID IN
(SELECT MC.CategoryID FROM AxCMS_BaseName..AxCategory MC WHERE MC.PublicationState IN (4))

Find all categories in the Management System marked as published, but not existing in the Live System

SELECT MC.*
FROM AxCMS_BaseName..AxCategory MC
WHERE MC.CategoryID NOT IN(SELECT LC.CategoryID FROM AxCMS_Live_BaseName..AxCategory LC)
AND MC.PublicationState IN (1,2,3)

MORE INFORMATION

 

Values for the field PublicationState:

1 = Active (published and not changed after that)
2 = Changed (changed, published and changed again after that)
3 = Deleted (deleted, should be deleted in Live System)
4 = NeverPublished (never published, new)

APPLIES TO

AxCMS.net versions: ver3.6 and above