ftAlias for limiting categories

Running 7.0.1 and trying to limit categories brought back in my custom object when editing in the admin. It looks like ftAlias should use the alias of the branch to just bring back that set of keywords, but it’s not. The alias and the keyword are named the same except for the case. I’m using the case that’s in the alias. This is working correctly on 6.2.0. I’m not sure at what point it broke. Looking at the core category type it SHOULD work with defining ftAlias, however, it’s not only bringing back that category branch.

I’m fairly certain this is fixed in a newer version of 7.0.x, can you try updating to the latest in the p700 branch?

Sadly I’m running into errors on pulling down the p700 branch. Nothing specific, it’s choking somewhere in security.cfc. Would it be worth going to p710?

Hmmm, can you try the latest tag, 7.0.9?

Don’t switch to p710 just yet, I’d like to make sure p700 is still stable as its due for a release :slight_smile:

If you can post any errors from your logs that would also help.

Alright, I’ve tried various tags of 7.0.x and although ftAlias started working, it started to bomb by assuming there was more than one category selected.

So in 7.0.9 the ftAlias works?

What do you mean “it started to bomb by assuming there was more than one category selected”, are you getting an error message on the screen or in your application/exception log files that I can use to track down the issue? A stack trace would be super helpful :smile:

It’s happening on 7.1.0 as well. It may be just the branch then.

Error Overview

Machine:	IoLaptop
Instance:	unknown
Message:	invalid call of the function getDescendantsAsNestedStruct (D:\cf_dev\projects\defense\farcry\core\packages\farcry\tree.cfc), first Argument (objectid) is of invalid type, can't cast String [C32EACB0-28F6-11E5-81BEF23C91701C5B,BA01D2C2-2C6B-41D7-BB60D1172929C6B6] to a value of type [UUID]
Browser:	Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36
DateTime:	{ts '2015-07-15 20:57:53'}
Host:	defense.local
HTTPReferer:	http://defense.local/farcry/core/webtop/index.cfm?id=ecomm
QueryString:	typename=product&method=edit&ref=iframe&module=/product.cfm&plugin=ecomm&objectid=91274A60-2A36-11E5-8C18F23C91701C5B&dialogID=fcModal
Bot:	not a bot
Error Details

Exception Type:	expression
Tag Context:	
D:\cf_dev\projects\defense\farcry\core\packages\formtools\category.cfc (line: 223)
D:\cf_dev\projects\defense\farcry\core\packages\formtools\category.cfc (line: 85)
D:\cf_dev\projects\defense\farcry\core\tags\wizard\object.cfm (line: 388)
D:\cf_dev\projects\defense\farcry\core\packages\types\types.cfc (line: 916)
D:\cf_dev\projects\defense\farcry\core\packages\types\types.cfc (line: 886)
D:\cf_dev\projects\defense\farcry\core\webtop\conjuror\invocation.cfm (line: 182)

Do you have the alias on more than one category?


I doubled checked that, and it appears to not be any duplication amongst names. There’s only 4 total aliases and they’re all what I would expect for the main roots that I set up under “root”.

Can you check your dmCategory table too? That value should only contain
more than one objectid if there is more than one category with the alias.
Are the nodes that those objectids correspond to significant?


Yep. I tried in dmCategory, only one with that name and alias. I tried in nested_tree_objects and refObjects. I cannot even find the ID it’s bringing back as I had deleted it. I tried to rebuild dmCategory from the admin menu and also the refObjects rebuild option. Very odd. It’s only the one category doing it. I’m not sure where the alias is hiding, but I might try renaming it as a workaround.

Hmm, the duplicate must be coming from somewhere… This is the query that builds the getCatAliases() cache (I’ve just removed the dbOwner variable that is normally prefixed on the table name):

SELECT objectid,alias
FROM dmCategory
WHERE alias IS NOT null OR alias <> ''

What output do you get when you run that?

CE43797A-0F7A-61E2-CCAEA1146DFFDD09	root
C32E85AF-28F6-11E5-81BEF23C91701C5B	size
BA01D2C2-2C6B-41D7-BB60D1172929C6B6	flavor
C32E5E90-28F6-11E5-81BEF23C91701C5B	productcats

Ok, so the problem objectid from your stack trace, C32EACB0-28F6-11E5-81BEF23C91701C5B, is missing from the output of that query, which is kind of strange…

Do you get any rows returned from any of these four queries?

SELECT * FROM refObjects WHERE objectid = 'C32EACB0-28F6-11E5-81BEF23C91701C5B';
SELECT * FROM dmCategory WHERE objectid = 'C32EACB0-28F6-11E5-81BEF23C91701C5B';
SELECT * FROM nested_tree_objects WHERE objectid = 'C32EACB0-28F6-11E5-81BEF23C91701C5B';
SELECT * FROM dmNavigation WHERE objectid = 'C32EACB0-28F6-11E5-81BEF23C91701C5B';

Not sure if you’re using CF/Railo/Lucee, but have you tried a service restart?

Just out of curiosity, what happens if you search your entire code base for C32EACB0-28F6-11E5-81BEF23C91701C5B? Any matches?

Also, this might seem like a silly question, but it’s worth double checking… Are you definitely querying the correct database above when running these test queries? :smile:

Hmm… dunno if it was something cached or what as it’s cleared out now. I had restarted services, but that didn’t seem to do it. Eh, well… I guess we can close this out then!