CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Error when following a link for Tags on Drupal View user profile page
Pages: [1]

Author Topic: Error when following a link for Tags on Drupal View user profile page  (Read 3101 times)

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Error when following a link for Tags on Drupal View user profile page
November 23, 2008, 07:47:37 am
Hello.

When I click a link like this (in a field 'Tag') on a View user profile page:


.../civicrm/profile?reset=1&force=1&gid=2&tag=8


I get the following error message:

Code: [Select]
backTrace

/home/..../public_html/sites/all/modules/civicrm/CRM/Core/Error.php, backtrace, 138
, handle,
/home/..../public_html/sites/all/modules/civicrm/packages/PEAR.php, call_user_func, 912
/home/..../public_html/sites/all/modules/civicrm/packages/DB.php, PEAR_Error, 966
/home/..../public_html/sites/all/modules/civicrm/packages/PEAR.php, DB_Error, 574
/home/..../public_html/sites/all/modules/civicrm/packages/DB/common.php, raiseError, 1903
/home/..../public_html/sites/all/modules/civicrm/packages/DB/mysql.php, raiseError, 898
/home/..../public_html/sites/all/modules/civicrm/packages/DB/mysql.php, mysqlRaiseError, 327
/home/..../public_html/sites/all/modules/civicrm/packages/DB/common.php, simpleQuery, 1216
/home/..../public_html/sites/all/modules/civicrm/packages/DB/DataObject.php, query, 2394
/home/..../public_html/sites/all/modules/civicrm/packages/DB/DataObject.php, _query, 1587
/home/..../public_html/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 144
/home/..../public_html/sites/all/modules/civicrm/CRM/Core/DAO.php, query, 885
/home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php, singleValueQuery, 2966
/home/..../public_html/sites/all/modules/civicrm/CRM/Profile/Selector/Listings.php, searchQuery, 340
/home/..../public_html/sites/all/modules/civicrm/CRM/Core/Selector/Controller.php, getTotalCount, 231
/home/..../public_html/sites/all/modules/civicrm/CRM/Profile/Page/Listings.php, __construct, 253
/home/..../public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, run, 347
, profile,
/home/..../public_html/sites/all/modules/civicrm/CRM/Core/Invoke.php, call_user_func, 164
/home/..../public_html/sites/all/modules/civicrm/drupal/civicrm.module, invoke, 315
, civicrm_invoke,
/home/..../public_html/includes/menu.inc, call_user_func_array, 348


Code: [Select]
    * warning: array_keys() [function.array-keys]: The first argument should be an array in /home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 2020.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 2020.
    * warning: Invalid argument supplied for foreach() in /home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 2026.
    * warning: array_keys() [function.array-keys]: The first argument should be an array in /home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 2030.
    * warning: implode() [function.implode]: Invalid arguments passed in /home/..../public_html/sites/all/modules/civicrm/CRM/Contact/BAO/Query.php on line 2030.

Code: [Select]

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    DB Error: syntax error

    Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) AND ( 1 )' at line 1, 1064

    Return to home page.



Code: [Select]
Error Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT count(*)  FROM civicrm_contact contact_a  LEFT JOIN civicrm_entity_tag `civicrm_entity_tag-` ON ( `civicrm_entity_tag-`.contact_id = contact_a.id )   WHERE  ( `civicrm_entity_tag-`.tag_id IN () )  AND  ( 1 )     [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') )  AND  ( 1 )' at line 1]
    [type] => DB_Error
    [user_info] => SELECT count(*)  FROM civicrm_contact contact_a  LEFT JOIN civicrm_entity_tag `civicrm_entity_tag-` ON ( `civicrm_entity_tag-`.contact_id = contact_a.id )   WHERE  ( `civicrm_entity_tag-`.tag_id IN () )  AND  ( 1 )     [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') )  AND  ( 1 )' at line 1]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT count(*)  FROM civicrm_contact contact_a  LEFT JOIN civicrm_entity_tag `civicrm_entity_tag-` ON ( `civicrm_entity_tag-`.contact_id = contact_a.id )   WHERE  ( `civicrm_entity_tag-`.tag_id IN () )  AND  ( 1 )     [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') )  AND  ( 1 )' at line 1]"]
)

I'm quite new to CiviCRM, so I do not know where to look in code (or how to test on some Demo place which I have seen in some of the places here)...

I suspect it does not like
Code: [Select]
`civicrm_entity_tag-`.tag_id IN ()

because of empty set in brackets. But I do not know how it got there.

Should I try to reproduce this bug on some demo machine?

Regards,
Danila[/code]

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error when following a link for Tags on Drupal View user profile page
November 23, 2008, 09:04:42 am

yes, can you please reproduce this issue on http://drupal.demo.civicrm.org/ and if you do so, please file a bug at http://issues.civicrm.org/

thanx

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

DanilaD

  • I post occasionally
  • **
  • Posts: 93
  • Karma: 11
Re: Error when following a link for Tags on Drupal View user profile page
November 24, 2008, 05:11:19 am
Checked the demo - could not replicate - noticed I'm using 2.1.1.

Upgrade to 2.1.2 solved the problem. Thanks a lot.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Error when following a link for Tags on Drupal View user profile page

This forum was archived on 2017-11-26.