MyBB Community Forums

Full Version: how can i deactivate or activate a plugin from its file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
How can i deactivate or activate a plugin from its file?


Like something is bugged in the ACP ==> Config ==> Plugins , and i want to deactivate it from its file /inc/plugins/

How can i ?
Just rename the file and it won't be able to find it.
(2014-08-25, 10:20 AM)Matt. Wrote: [ -> ]Just rename the file and it won't be able to find it.

That's not the point , lemme tell you what i mean


So i've had a plugin , and i wanted to put the new version , i forgot to deactivate ti before deleting the file , so id eleted its files and put the new version files , but when i imported them , and went to the plugins , Config >> Plugins , it was activated! when i clicked "Deactivate" it gave me an error


To be more specific , its form manager:
When i clicked on deactivate it gave me that error

Quote:SQL Error:1051 - Unknown table 'gega_14967527_ncg.mybb_forms'Query:DROP TABLE mybb_forms

so i want to deactivate it , from its file!
so i can re install it

PS: i tried to rename it and reimport the plugin , but it didnt work
^ can you upload back the old version files of the plugin, deactivate & uninstall
re-upload the new version files & install and activate
Seems a good idea , im gonna test that and reply

After i've tested that twice , deleted all of the new version files and imported the old version files i got an error when i tried to deactivate the plugins

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1051 - Unknown table 'gega_14967527_ncg.mybb_forms'
Query:
DROP TABLE mybb_forms

Please note that the old version was working and has no errors.
Can you please give us links to both the plugins.
Well , i bought the plugins they are perm , they are working the problem is from MyBB as i had the old version working now it got an error after i deleted teh file without deactivating the old version

I tried to rebuild the cache of the plugins , but still nothing!
Looks like it's not been coded properly, I guess you'd just need to look at the code it runs and manually perform those actions, there's not a lot else you can do if the deactivation code doesn't actually work.
If any of the Staff want the files , i can give you , there are 3 for the old one:

1. inc/plugins/forms.php
2. /forms.php
3. /admin/moduels/config/forms.php

Just pm me for them

PS: i found a new thing , when i deactivate it , it actually said that a table called "mybb_forms" wich is in phpmyadmin > Host , dosent exist , and when i went to phpmyadmin i didnt also find it , how can i resolve this and get the table back?
When you tried to deactivate the new version, it probably deleted that table before attempting to delete a table which was introduced in the new version. I suggest you create a dummy table with that name (mybb_forms) and try to deactivate the old version.

I would agree that this plugin was not well-written, since tables should normally be deleted on uninstall instead of deactivate (that way you can maintain information between versions). Also, plugins should verify that a table or field exists before trying to delete or create it.
Pages: 1 2