Element CATID.ROOT is undefined in APPLICATION

Howdy,

The webtop is throwing this error: Element CATID.ROOT is undefined in APPLICATION on every page under Media & Categories (Image Library, Document Library, etc.).

A user reported errors: “add/delete functionality on the keyword manager as well as the drag and
drop seems buggy, which I only realized after dragging and
dropping a few categories and seeing them show up in places I definitely
did not put them. Now there’s now a 500 error when I try to go to that Manage
Keywords menu.”

So I updated the application, “Applied Default Resolutions” to deploy or repair the schema under COAPI Content Types, Repaired Ref Objects and updated the application. That actually made the problem worse. That is, the CATID.ROOT is undefined error then appeared on all the pages I mentioned at the beginning. Any ideas? Thanks!

Most likely, the root category lost its alias or was deleted altogether. So, I would go into the database in the dmCategory table, find the root node and make sure its alias is “root”. If you are missing this (because it was deleted somehow), then you’ll need to create a new record called Root and give it an alias. If it is missing, you’ll probably also need to add it to the nested_tree_objects table and refObjects as well.

Thanks!. I did everything you said and at least now the site is working again…

Still getting errors on all the Media & categories pages. The page cuts off before the error dump, but I got some from the source code:

Detail [empty string] 
ErrNumber 0 
Message The element at position 1 cannot be found. 

StackTrace
					
coldfusion.runtime.CfJspPage$ArrayBoundException: The element at 
position 1 cannot be found.
	at coldfusion.runtime.CfJspPage.ArrayGetAt(CfJspPage.java:912)
	at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:972)
	at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:967)
	at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:734)
	at coldfusion.runtime.CfJspPage._arrayGetAt(CfJspPage.java:720)
	at Statement3025.evaluate(<generated>:1)
	at coldfusion.runtime.CFPage.evaluateCondition(CFPage.java:8044)
	at 
cftree2ecfc1483703757$funcGETDESCENDANTSASNESTEDSTRUCT.runFunction(  \farcry\core\packages\farcry\tree.cfc:587)

	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at 
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at 
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

	at 
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at 
cfcategory2ecfc1693218723$funcEDITJQUERY.runFunction(\farcry\core\packages\formtools\category.cfc:193)

	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at 
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at 
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

	at 
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2547)
	at 
cfcategory2ecfc1693218723$funcEDIT.runFunction(  \farcry\core\packages\formtools\category.cfc:84)

	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at 
coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
	at 
coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)

	at 
coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)

	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:517)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:496)
	at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:355)
	at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2301)
	at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:389)

You can try the rebuild tree metadata tool in the webtop under the admin tab. Choose category from the dropdown and rebuild the tree.

Oh, man, thanks a lot. I’m getting ready for vacation, so this was an untimely development. Anyway, rebuild tree metadata tool did the trick. I had done that before, but, in hindsight, it was futile until those db records were re-created.

The real issue is, how did the root node get deleted in the first place?! Was it a bug in core? Were you messing around with categories and it just disappeared? Or, did you actually delete it?

No doubt. And I don’t know fore sure. I think the user deleted the root category (Categories). Then I Updated the app, repaired the schema under COAPI Content Types and repaired Ref Objects, which broke the whole site (deleted orphaned records caused by the Categories root delete?). The db was not accessed directly until I re-created the records you suggested.

Historically the tree code has been prone to corruption if users do not wait for operations to complete. This is exacerbated by slow apps or users doing multiple operations without realising – like drag and dropping elements around in the tree.

In 7.0 we’ve rebuilt the whole Site Tree interface – its pretty rock solid now, and we’ve been unable to corrupt the tree since. Unfortunately, the Category Tree has not had the same love.

The best recommendation is to treat the Category Tree with “kid leather gloves”:

  • only make changes to the tree structure sparingly and be sure to allow every operation to complete before doing the next one
  • never delete the root node or remove the root alias – changing the label is fine
  • run the Repair Tree utility in developer tools at the first sign of things not being right

Hope that helps :smile:

Ahh, well, it makes me feel a little better anyway :). That’s informative; I will pass the info along to the end user. Thanks!