getByHandle is not specific to category ?

I already have a Page attribute called "is_featured".
I'm also want to use a File attribute that will be called the same "is_featured"

When calling FileAttributeKey::getByHandle('is_featured') to verify that this FileAttribute doesn't already exists, it returns true (which is incorrect, I didn't create it yet).

I think it's because getByHandle doesn't filter with akCategoryID field when querying the DB.

Is that a bug ? Just want to make sure. thanks

View Replies:
francoiscote replied on at Permalink Reply
more clearly, without the example.

getByHandle() should validate against the attribute category. Currently, calling both following functions seems to do the exact same thing:


which means you cannot have a File Attribute Key with the same handle as a Collection Attribute Key ?
adavis replied on at Permalink Reply
Did you make any progress with this? I am just starting out with C5 and curious about this myself.
francoiscote replied on at Permalink Reply
sadly no

If my memory is correct, I think I went around the problem by naming my two handles differently based on the type.

I will log this as a bug instead of here in the forum.
andrew replied on at Permalink Reply
I think this actually is already logged:

Would you mind testing on the latest version in I think we have fixed this.
francoiscote replied on at Permalink Reply
I search the bugs for "getByHandle" and couldn't find anything.

I will check it out on github. By the way, it doesn't seem easy to find the link to the github repo from