Open Bug 820773 Opened 7 years ago

sample script has broken enable/disable handlers

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: cuteangel24, Assigned: rginda)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20121128204232

Steps to reproduce:

I read the FAQ <http://chatzilla.hacksrus.com/faq/#scripts> about writing scripts, which linked me to <http://chatzilla.hacksrus.com/scripts/sample/init.js>. I followed this sample script in writing my own script and was able to successfully install and load my new script.

Then I tried to disable my script.


Actual results:

Chatzilla displayed an unhelpful error message: "Unable to disable plugin <foo>".


Expected results:

Chatzilla should have disabled the plugin (or told me what the problem is).

The problem is that the sample script has broken disable/enable handlers: They must return true for Chatzilla to work. They currently return undefined, which makes Chatzilla refuse to do anything with the script (and prints a useless message).

Combined with bug #820770 this means Chatzilla won't unload the broken script. Ever.
You need to log in before you can comment on or make changes to this bug.