{"action":"created","issue":{"url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/56","repository_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui","labels_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/56/comments","events_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/56/events","html_url":"https://github.com/grails-plugins/grails-spring-security-ui/issues/56","id":172585373,"number":56,"title":"Error with Grails Spring Security UI Plugin when creating new user - Error Processing GroovyPageView","user":{"login":"mickdavis","id":627477,"avatar_url":"https://avatars.githubusercontent.com/u/627477?v=3","gravatar_id":"","url":"https://api.github.com/users/mickdavis","html_url":"https://github.com/mickdavis","followers_url":"https://api.github.com/users/mickdavis/followers","following_url":"https://api.github.com/users/mickdavis/following{/other_user}","gists_url":"https://api.github.com/users/mickdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/mickdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mickdavis/subscriptions","organizations_url":"https://api.github.com/users/mickdavis/orgs","repos_url":"https://api.github.com/users/mickdavis/repos","events_url":"https://api.github.com/users/mickdavis/events{/privacy}","received_events_url":"https://api.github.com/users/mickdavis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-23T00:24:52Z","updated_at":"2016-08-23T14:18:07Z","closed_at":null,"body":"I'm getting the following error using the Spring Security UI Plugin when I click on the link to create a new user:\r\n\r\n`\"Error processing GroovyPageView: Error executing tag <s2ui:form>: Error executing tag <s2ui:tabs>: Error executing tag <s2ui:tab>: Error executing tag <s2ui:textFieldRow>: assert beanType | null\"`\r\n\r\nI'm running Grails 2.5.5 with SpringSecurityCore 2.0.0 and SpringSecurityUI 1.0-RC3. I have not customized anything about the plugins.\r\n\r\nEverything was working fine for several days. I'm able to create Roles, I can search for and edit Users. Everything except the ability to create a new User. I've spent over 8 hours trying to debug this.\r\n\r\nHere's the trace:\r\n\r\n`Line | Method\r\n->>  528 | doFilter  in  /home/mdavis/development/grails/maintenanceManager/target/work/plugins/spring-security-ui-1.0-RC3/grails-app/views/user/create.gsp\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\nCaused by GrailsTagException: Error executing tag <s2ui:form>: Error executing tag <s2ui:tabs>: Error executing tag <s2ui:tab>: Error executing tag <s2ui:textFieldRow>: assert beanType\r\n   |\r\n   null\r\n->>   35 | doCall    in /home/mdavis/development/grails/maintenanceManager/target/work/plugins/spring-security-ui-1.0-RC3/grails-app/views/user/create.gsp\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\nCaused by GrailsTagException: Error executing tag <s2ui:tabs>: Error executing tag <s2ui:tab>: Error executing tag <s2ui:textFieldRow>: assert beanType\r\n   |\r\n   null\r\n->>   31 | doCall    in /home/mdavis/development/grails/maintenanceManager/target/work/plugins/spring-security-ui-1.0-RC3/grails-app/views/user/create.gsp\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\nCaused by GrailsTagException: Error executing tag <s2ui:tab>: Error executing tag <s2ui:textFieldRow>: assert beanType\r\n   |\r\n   null\r\n->>   21 | doCall    in /home/mdavis/development/grails/maintenanceManager/target/work/plugins/spring-security-ui-1.0-RC3/grails-app/views/user/create.gsp\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\nCaused by GrailsTagException: Error executing tag <s2ui:textFieldRow>: assert beanType\r\n   |\r\n   null\r\n->>   13 | doCall    in /home/mdavis/development/grails/maintenanceManager/target/work/plugins/spring-security-ui-1.0-RC3/grails-app/views/user/create.gsp\r\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n\r\nCaused by PowerAssertionError: assert beanType\r\n   |\r\n   null\r\n->>  817 | labelCode in SecurityUiTagLib.groovy`\r\n\r\n\r\nAny help would be greatly appreciated. Sorry in advance if this is hard to read, I've never posted anything here before.\r\n\r\nThanks in advance.\r\n\r\nMick\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/comments/241745761","html_url":"https://github.com/grails-plugins/grails-spring-security-ui/issues/56#issuecomment-241745761","issue_url":"https://api.github.com/repos/grails-plugins/grails-spring-security-ui/issues/56","id":241745761,"user":{"login":"marvinthepa","id":51218,"avatar_url":"https://avatars.githubusercontent.com/u/51218?v=3","gravatar_id":"","url":"https://api.github.com/users/marvinthepa","html_url":"https://github.com/marvinthepa","followers_url":"https://api.github.com/users/marvinthepa/followers","following_url":"https://api.github.com/users/marvinthepa/following{/other_user}","gists_url":"https://api.github.com/users/marvinthepa/gists{/gist_id}","starred_url":"https://api.github.com/users/marvinthepa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marvinthepa/subscriptions","organizations_url":"https://api.github.com/users/marvinthepa/orgs","repos_url":"https://api.github.com/users/marvinthepa/repos","events_url":"https://api.github.com/users/marvinthepa/events{/privacy}","received_events_url":"https://api.github.com/users/marvinthepa/received_events","type":"User","site_admin":false},"created_at":"2016-08-23T14:18:07Z","updated_at":"2016-08-23T14:18:07Z","body":"I think I found the issue. Spring-security-ui does not like it when the \"Person\" and \"Role\" domain objects (see http://grails-plugins.github.io/grails-spring-security-core/v2/guide/domainClasses.html#personClass) return null in their \"toString\" methods.\r\n\r\nSo my solution was to change\r\n\r\n```\r\n    String toString() {\r\n        return this.username\r\n    }\r\n```\r\n\r\nto\r\n\r\n```\r\n    String toString() {\r\n        return this.username ?: 'Person without username'\r\n    }\r\n```\r\n\r\n(this is for the `Person` class, but I had to update the `Role` class accordingly).\r\n\r\n"}}
{"actor":{"display_login":"marvinthepa"}}