mshajkarami's answer solved my problem. The attribute of my custom view's 'attr' duplicated with one of the existing attributes in the system's 'values', and the problem was fixed after I renamed it.