This is probably quite unlikely to happen, but it happened for us: We used the Module, customer decided to not use TAC any more, disabled the module and then we had a "function not found" on every node edit with a taxonomy reference field.
The Problem is, that TAC adds a new callback in taxonomy_access_field_info_alter() but never removes it again when the module is disabled.
Now the taxonomy_options_list function in drupal core does not check if the defined functions does exist and fails.
I already wrote a core patch #1358094: Function taxonomy_options_list() should check if function exists , but maybe you want also to take care about this problem?
Basically the best would be to remove the callback setting when disabling?
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 1358106-14.patch | 718 bytes | pwolanin |
| #10 | taxonomy_access-1358106-10-test_only.patch | 2.11 KB | tim.plunkett |
| #10 | taxonomy_access-1358106-10.patch | 2.98 KB | tim.plunkett |
| #8 | taxonomy_access-1358106-8.patch | 2.99 KB | tim.plunkett |
| #8 | taxonomy_access-1358106-8-test_only.patch | 2.11 KB | tim.plunkett |
Comments
Comment #1
xjmYeah, this is a known issue. #1281732: Fatal error when taxonomy_options_list() tries to call an undefined callback function is the core issue, but we probably need to provide a workaround.
Comment #2
xjmComment #3
schnitzel commentedhere a patch which sets all callbacks empty during disabling the module (deinstalling would be too late)
Comment #4
schnitzel commentedsorry here a better one, without ugly debugging ;)
Comment #5
schnitzel commentedComment #6
schnitzel commentedwrong patch, ignore
Comment #7
schnitzel commentedand here the patch with tests included. BTW: found out that I made a == instead of a = in the above patches during writing the tests ;) but at least I know now that the tests work!
Comment #8
tim.plunkettCleaned up the docs a bit. Uploading both the test and fix, and just the test.
Awesome patch @Schnitzel!
Comment #10
tim.plunkettWhoops, my bad.
Comment #11
xjmNice to have this fixed. Thanks!
http://drupal.org/commitlog/commit/364/bc47c914ef1f50c2bf77dd01e9327c8cb...
Comment #13
pwolanin commentedenable and disable the module and get:
Comment #14
pwolanin commentedComment #15
xjmFixed in -dev:
http://drupal.org/commitlog/commit/364/387b2d9430ea1477d4e013f045fea41f5...