apeisa / UserGroups

Adds users groups and page based permission to ProcessWire
GNU General Public License v2.0
11 stars 4 forks source link

Tried the module and fixed a few bugs #28

Closed rlanvin closed 10 years ago

rlanvin commented 10 years ago

Hello,

I'm trying your module on a project using the latest PW. Unfortunately it didn't work out-of-the-box, because this project is using "PageTitleLanguage" field type. When the field "title" is a PageTitleLanguage field, the page title is an object and needs to be casted to string, otherwise warnings (illegal offset type) and weird display (e.g. "[object Object]" instead of group name) occur.

I don't think it's related, but there was also a problem with the UserGroupsHooks creating a fatal error when trying to edit user profile if the user wasn't in any group ($inputfield was null, and therefore $inputfield->isChanged() was not valid).

niklaka commented 10 years ago

Thanks @rlanvin, good catches both of them! They indeed were not related, but I'll still merge this as is without splitting them to separate commits. I will soon be adding at least one more check there as you just made me see there's no point in running that very handler in certain circumstances at all.

Drop us a line should you find anything else working irrationally. We're also interested in getting any comments on possible future directions with this module - just file an issue. Thanks again.