When uninstalling the module it generates a PDO error:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'user' in 'where clause': UPDATE {block} SET status="1" WHERE module="user" AND delta="0"; Array ( ) in simplesamlphp_auth_uninstall() (line 42 of /Users/robertdouglass/Sites/paradiso/trunk/docroot/sites/all/modules/simplesamlphp_auth-HEAD-f69f5e3/simplesamlphp_auth.install).

I think that enabling the block is undesired behavior. No module should assume what blocks are supposed to be visible, and besides, the block is not disabled on installation, so it's not even symmetrical. This patch has the bugfix from #1310722: db_result deprecated in D7 in it as well.

Comments

robertdouglass’s picture

StatusFileSize
new951 bytes

Looks like I had the patch backwards.

robertdouglass’s picture

StatusFileSize
new1.37 KB

Unneeded messages upon uninstall. Drupal confirms success for you, the module doesn't need it.

geekwisdom’s picture

Status: Needs review » Reviewed & tested by the community

Thank you for this Robert! I've applied your latest patch and committed it to master. Please pull it down and test it in your environment and let me know how it things look. If you are satisfied with the results I'll close this issue.

cpliakas’s picture

Status: Reviewed & tested by the community » Needs work

Bumping this down to "needs work" as I am still getting fatal errors after applying this patch. It seems the patch in #2 overlaps with the one at #1310722: db_result deprecated in D7, however that is where my issue is as D7 no longer has the {permission} table. In addition to renaming the table in the query, the logic has to be reworked as well since the structure of the permissions table changed.

As a side note, similar to the automatic block enabling I think it is undesired behavior to automatically change permissions. If the permission changes are required for the module to work, then I would suggest adding something in hook_requirements() or placing a waning message in the admin page prompting the user to explicitly change the permissions. This does add complexity to the install, but I still feel that it is a better option than modifying permissions behing the scenes.

Thanks,
Chris

westie’s picture

I have updated #1310722: db_result deprecated in D7 so hopefully this should also help this issue.

geekwisdom’s picture

Status: Needs work » Needs review

Do any of these issues still exist in the 7.x-2.x development branch? I've cleaned up the .install file thanks to contributions from robertDouglass and westie.

colan’s picture

Status: Needs review » Fixed

No response, so marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.