I get the WSOD (White Screen Of Death) when I try to edit a page. I turned on PHP error messages and get this:

Fatal error: Call to undefined function content_taxonomy_allowed_values() in /var/www/html/websites/xxxx/modules/taxonomy/taxonomy.module on line 1328

I've this error listed here for content_taxonomy for D6. I'm seeing the same thing in a website I just upgraded from D6 to D7.

CommentFileSizeAuthor
#12 1373716.patch872 bytesowen barton

Comments

philsward’s picture

I can also confirm this same error on an upgrade from D6 -> D7. I too am receiving the error on a node edit, node add and the content type fields term reference edit screen.

ericinwisconsin, did you disable the content_taxonomy module? Or is it still enabled?

In my situation, I disabled, then uninstalled the content_taxonomy module. After disabling it, I began running into this same error, however mine is showing up: "...\taxonomy.module on line 1336" (instead of 1328)

If I re-enable the module, the problem goes away. I tried browsing for everything "content_taxonomy" in the database and deleting it, but this ended up getting rid of my taxonomy fields altogether... (Glad I made a backup before hand...)

From what I can tell, the migration / uninstall process is not properly editing the database to clean the necessary records...

Thoughts?

ericinwisconsin’s picture

Yes, I disabled it, deleted it, reinstalled it, etc. While the content_taxconomy MAY be the issue, I can't seem to correct it with the proper steps.

philsward’s picture

So even after re-enabling it, you are still having the error?

One thing I noticed after I migrated was that I had to 1st make the reference of the field, then each node had a "taxonomy extras" with an autocomplete of tags sorted by a coma. I created a view that showed the taxonomy terms of a node as well as the "taxonomy extra" terms for the same node. The view would show that I indeed had terms associated with the new field, however if I went to the node, the taxonomy terms were not set and I had to manually set the terms for each and every node, then delete the taxonomy extra terms. I wasn't able to save a node until I removed the taxonomy extra terms. It gave me an error if I tried to save and the taxonomy upgrade terms were there... (It was a pain in the butt...)

dkingofpa’s picture

Title: WSOD When I Try To Edit A Node » Call to undefined function content_taxonomy_allowed_values()
Priority: Normal » Critical

Getting this problem on a new D7 site. Steps to reproduce (at least for me):

  1. Download and enable module
  2. Create vocabulary
  3. Create content type
  4. Add Term reference field with checkbox widget to content type (didn't see any content_taxonomy options here)
  5. Disable and uninstall module
  6. Click edit link on Term reference field
  7. WSOD

My solution:

  1. Delete Term reference field

I decided to use the Taxonomy Term Reference Tree Widget instead.

luksak’s picture

Having this problem as well. But I am getting the WSOD everywhere! My site was unusable.

Would the maintainer be so kind and fix this issue?

I had to manually re-enable the module in the database to get my site up and running again...

samsouk’s picture

Same problem too,
it's an uninstall problem: content_taxonomy doesn't reset the fields settings
this is similar to TAC http://drupal.org/node/1358106

adapted from TAC :

<?php
foreach (field_read_fields() as $field_name => $field) {
  if ($field['type'] == 'taxonomy_term_reference') {
    if (!empty($field['settings']['options_list_callback']) && $field['settings']['options_list_callback'] == 'content_taxonomy_allowed_values') {
      $field['settings']['options_list_callback'] = '';
      field_update_field($field);
    }
  }
}
?>
jay-dee-ess’s picture

Same issue.

kenorb’s picture

$ drush -y en search_api_views
drushThe following extensions will be enabled: search_api_views
Do you really want to continue? (y/n): y
 -y cc all
PHP Fatal error:  Call to undefined function content_taxonomy_allowed_values() in taxonomy/taxonomy.module on line 1485

Fatal error: Call to undefined function content_taxonomy_allowed_values() in taxonomy/taxonomy.module on line 1485
Drush command terminated abnormally due to an unrecoverable error.                                                                                                                                                                                                  [error]
Error: Call to undefined function content_taxonomy_allowed_values() in taxonomy/taxonomy.module, line 1485
philsward’s picture

This might help someone: http://drupal.org/node/1208164

kenorb’s picture

In my case it was caused by feature module where there was some callback dependency:

'options_list_callback' => 'content_taxonomy_allowed_values',

and feature didn't have proper dependency (in taxonomy_term_reference field):

dependencies[] = content_taxonomy
blackdog’s picture

i18n_taxonomy has this in it's i18n_taxonomy.install:

/**
 * Implements hook_disable()
 */
function i18n_taxonomy_disable() {
  foreach (field_info_fields() as $fieldname => $field) {
    if ($field['type'] == 'taxonomy_term_reference' && $field['settings']['options_list_callback'] == 'i18n_taxonomy_allowed_values') {
      $field['settings']['options_list_callback'] = NULL;
      field_update_field($field);
    }
  }
}

Something similar should probably be included in content taxonomy.

owen barton’s picture

Title: Call to undefined function content_taxonomy_allowed_values() » Call to undefined function content_taxonomy_allowed_values(), preventing disable/uninstall
Status: Active » Needs review
StatusFileSize
new872 bytes

Here is a patch that implements the above - this approach works for me.

field_update_field() is tricky and uses prior values, so unset() doesn't have any effect - this also explains why even hacking the configuration out of features had no effect.

Note that if you re-enable it, I think you will have to resave the field config to re-insert the callback.

jide’s picture

Status: Needs review » Reviewed & tested by the community

Thanks Owen, seems to work.

greg boggs’s picture

Works for me as well.

mh86’s picture

Status: Reviewed & tested by the community » Fixed

Committed patch from #12 with two adaptation:

  • Added "Implements hook_disable()." to function documentation (+note that re-enabling requires a re-save)
  • Move implementation to the content_taxonomy.install file.

Thanks for the patch and testing!

Status: Fixed » Closed (fixed)

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

maxplus’s picture

Thanks Owen,

patch from #12 also helped me out after searching a long time after the reason why I suddenly had a WSOD on node/edit.
When I found out the cause was the disabled Content Taxonomy module, I was really happy to find the solution here!

ChrisValentine’s picture

Issue summary: View changes

Got this error on one of my D7 sites after doing recent updates. Tried clearing all caches using Drush but that made no difference. Turned out that Views UI, Taxonomy Translation and a few other modules had been disabled - re-enabling them and the error vanished.