fix viewVar value when using crud in a plugin