Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
taxonomy.admin.inc
On line 282,
$total_entries = db_query(db_rewrite_sql('SELECT count(*) FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d', 't', 'tid'), $page_increment, 0, NULL, $vocabulary->vid);
should be :
$total_entries = db_query(db_rewrite_sql('SELECT count(*) FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d', 't', 'tid'), $vocabulary->vid);
Only $vocabulry->vid is needed, with the wrong arguments in db_query, t.vid must always be equal to $page_increment (==100)
Comments
Comment #1
ebelrose CreditAttribution: ebelrose commentedin fact, should be
$total_entries = db_result(db_query(db_rewrite_sql('SELECT count(*) FROM {term_data} t INNER JOIN {term_hierarchy} h ON t.tid = h.tid WHERE t.vid = %d', 't', 'tid'), $vocabulary->vid));
$total_entries is supposed to be an integer.
Comment #2
ebelrose CreditAttribution: ebelrose commentedRelated to error:
warning: preg_match() expects parameter 2 to be string, resource given in /includes/bootstrap.inc on line 777
on page admin/content/taxonomy/%taxonomy_vocabulary
http://drupal.org/node/658412
http://drupal.org/node/641712
Comment #3
zoo CreditAttribution: zoo commentedHello,
I apologize for my question, I'm not an expert of Drupal. I get this error in Taxonomy adding/views terms.
Is there something I should do in order to resolve the problem?
Thank You
zoo
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedI get the same error as well, taxonomy tag option selected.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedI also get the warning:
preg_match() expects parameter 2 to be string, resource given in /drupal/includes/bootstrap.inc on line 777.
on the page admin/content/taxonomy/1 but strangely not on admin/content/taxonomy/2. One difference is that 1 is a free tagging taxomomy and 2 is not.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedUpdate: Drupal for firebug module issue #598016: Don't call check_plain() on resource variables might be the culpit, has a fix that seems to solve it for me.
Comment #7
mattcasey CreditAttribution: mattcasey commentedI can't edit my vocabulary or its terms. Last time I had updated a term I was using drupal 6.15 and now using 6.16. After I submit form, drupal says it has updated and saved everything, but the changes are missing when I go back. I am using neither free tags nor DrupalForFirebug.
I get the first error on every page, the other errors only on the Terms List page:
warning: preg_match() expects parameter 2 to be string, array given in /var/www/vhosts/graphiclabinc.com/httpdocs/includes/bootstrap.inc on line 777.
warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /var/www/vhosts/graphiclabinc.com/httpdocs/includes/database.mysqli.inc on line 323.
warning: Illegal offset type in isset or empty in /var/www/vhosts/graphiclabinc.com/httpdocs/includes/common.inc on line 912.
warning: Illegal offset type in isset or empty in /var/www/vhosts/graphiclabinc.com/httpdocs/includes/common.inc on line 912.
Comment #8
mattcasey CreditAttribution: mattcasey commentedI restored a Backup I had made before editing my taxonomy terms and everything's allright again. Was not able to identify the actual problem though :/
Comment #9
dpearcefl CreditAttribution: dpearcefl commentedIs this issue still occurring in the current version of Drupal v6?
Comment #10
dpearcefl CreditAttribution: dpearcefl commented