Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just got this error when trying to uninstall the module in latest D7 dev.
Comment | File | Size | Author |
---|---|---|---|
#6 | db_delete-1164308-3.patch | 303 bytes | Cory Goodwin |
Comments
Comment #1
Draven_Caine CreditAttribution: Draven_Caine commentedSame for me, Just un-installed the module. and .. Notice: Undefined property: DeleteQuery::$execute in switchtheme_uninstall() (line 15 of /.../.../.../public_html/sites/all/modules/switchtheme/switchtheme.install).
Comment #2
johnlaine CreditAttribution: johnlaine commentedI also had this error and now I can't change themes in the admin->appearance screen. Well, I can change the theme but it does not change on the site. If I reinstall and enable the switchtheme module I can then change themes. So apparently it is not uninstalling completely, something left behind in the database? This is the switchtheme.install file, the error is referring to the line 14: ->condition('name', 'switchtheme_%', 'LIKE')
I'm a noob, so any help is greatly appreciated.
Comment #3
johnlaine CreditAttribution: johnlaine commentedOk, so I figured out that the error was in the last line "->execute;" it is missing the "()" , like this:
But... after disabling and uninstalling the module, it still shows up in the module list and now does not show up in the list of uninstallable modules. And the theme still does not change for user 1 but when I log out it does change for all other users.
Comment #4
Balbo CreditAttribution: Balbo commentedStill there in 7.x-1.0!
Comment #5
jvieille CreditAttribution: jvieille commentedI don't knnow if it is related, but I cannot uninstall this module. I get this error
Fatal error: Call to undefined function db_delete() in .../sites/all/modules/switchtheme/switchtheme.install on line 12
Comment #6
Cory Goodwin CreditAttribution: Cory Goodwin commented@ jvieille if you are still having this problem please open up a separate issue.
Attached a patch with johnlaine's fix.
Comment #7
jvieille CreditAttribution: jvieille commentedNo, it does not seem to help - same error
Comment #8
jvieille CreditAttribution: jvieille commentedSimilar issue, but different problem for D6
Solution here
https://drupal.org/node/2177305
Comment #9
XTazsolve the problem for me
Comment #10
XTazAfter reading, SOURCE 1 and SOURCE 2, if variable_del() is not use, it is good to also clear the variable cache :