I was playing around with a hack and forgot to deactivate one module: refine by taxonomy

This caused the following error on all pages, which I only have in part:
Fatal error: Call to undefined function taxonomy_term_count_nodes() common.inc(1355)

What I did was that I deactivated the listed dependent modules of taxonomy.module. But refine by taxonomy is not listed.

So this caused the error and I had to enable the taxonomy.module in the 'system' table via phpmyadmin.

This brought Drupal 5.10 back again in my browser.

This was a real shocker.. :o

I have some 500 terms defined.

Drupal status is this:
MySQL database 5.0.32
PHP 5.2.6-0.dotdeb.1
PHP register globals Ingen
Unicode-bibliotek PHP mbstring-udvidelse
webserver Apache/2.2.3 (Debian)

Comments

andreashaugstrup’s picture

Title: deactivating taxonomy.module caused fatal error » .info file doesn't list taxonomy.module as a dependency
Project: Drupal core » Refine by taxonomy
Version: 5.10 » 5.x-0.1
Component: taxonomy.module » Code

Not a problem with DrupalCore, but a problem with Refine by Taxonomy. It doesn't list taxonomy.module as a dependency but it should.

FlemmingLeer’s picture

Title: .info file doesn't list taxonomy.module as a dependency » deactivating taxonomy.module caused fatal error
Project: Refine by taxonomy » Drupal core
Version: 5.x-0.1 » 5.10
Component: Code » taxonomy.module

It is a problem with Drupalcore.

I made a copy of my database and disabled all of the dependent modules including refine by taxonomy and I can recreate the error when I disable taxonomy.module.

I get this error on admin/build/modules page after disabling taxonomy.module:
Fatal error: Call to undefined function taxonomy_term_count_nodes() in /install path domain/includes/common.inc(1355) : eval()'d code on line 14

But going to the main page I am able to go the the normal admin/build/modules page.

The error appears each time taxonomy.module is disabled.

andreashaugstrup’s picture

Project: Drupal core » Refine by taxonomy
Version: 5.10 » 5.x-1.x-dev
Component: taxonomy.module » Code
Status: Active » Closed (duplicate)

Marking as duplicate of #314603 that you also posted. This is not a bug in taxonomy.module, but a missing dependency in refine by taxonomy. Just add taxonomy.module as a dependency to refine by taxonomy yourself and you'll see everything working as expected. So don't open this issue again.

FlemmingLeer’s picture

Refine by taxonomy is not even in the Drupal 5.10 installation in question and I still get this error when I disable taxonomy.module the first time:

Fatal error: Call to undefined function taxonomy_term_count_nodes() in /home/www/drupal5.denmarkonline.dk/includes/common.inc(1355) : eval()'d code on line 14

Xen’s picture

Status: Closed (duplicate) » Closed (works as designed)

It isn't a core problem. common.inc line 1355 is drupal_eval, a function used to evaluate PHP inside nodes, blocks and other places where Drupal allows you to supply PHP code to be evaluated.

Drupal core doesn't contain any code that runs though drupal_eval. So the problem code is either supplied by refine by taxonomy or you.

If you supply invalid code for block visibility or content, your site will break.

FlemmingLeer’s picture

Title: deactivating taxonomy.module caused fatal error » Okay - found the reason
Status: Closed (works as designed) » Closed (fixed)

Thanks Xen.dk for that explanation.

I found the reason for the error from your explanation. I use a custom made drop down menu based on taxonomy in a block in php and it was not deactivated and therefore kept using something that wasn't there :/

I close this issue.

Bèr Kessels’s picture

Status: Closed (fixed) » Closed (duplicate)
skatheeth’s picture

Issue summary: View changes

Hi All,

I got this error - > Fatal error: Call to undefined function taxonomy_term_count_nodes() . The error occurred due to taxonomy module finding the function taxonomy_term_count_nodes() which did not exists in drupal 7. So i referred to https://drupal.org/comment/6023198#comment-6023198 and found the solution.

Regards,
Shraddha