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 Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Tag Error
Pages: [1]

Author Topic: Tag Error  (Read 374 times)

bpuli

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.0.96
  • PHP version: 5.3.14
Tag Error
March 12, 2014, 02:42:55 pm
I am running CiviCRM 4.4.4 on Joomla 2.5.17.

I am unable to add/remove tags from contact records. Doing so results in a "Error" popup (on the top right) with no additional information on what the error is about. All I can do is to close the error popup.

I then turned on debug mode to see if I could find additional information on the error. No debug info shows at all (for any page). Debug mode not working? Anyone else seen this problem? Nothing in any of the logs either.

Any pointers on how I can figure out what the problem is?

Thanks.

joanne

  • Administrator
  • Ask me questions
  • *****
  • Posts: 852
  • Karma: 83
  • CiviCRM version: 4.4.16
  • CMS version: Drupal 7
Re: Tag Error
March 12, 2014, 04:00:14 pm
I don't know if this relevant or not, but the recommendation for CiviCRM 4.4 (http://wiki.civicrm.org/confluence/display/CRMDOC/Joomla+Installation+Guide+for+CiviCRM+4.4) is
Quote
MySQL 5.1.x or higher with INNODB support
  Your profile says you are using MySQL 5.0, but as it also says you are using CiviCRM 4.2 it seems like it is out of date.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Tag Error
March 13, 2014, 12:49:47 am
Hi,

open firebug and see what is the json returned.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

bpuli

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.0.96
  • PHP version: 5.3.14
Re: Tag Error
March 13, 2014, 04:31:06 am
Thanks for the tip. So I installed firebug and I guess I found out what the error is but still don't know why.

Here is the error message:

0   "error_message"
   
1   "Unable to decode supplied JSON."
   
is_error    1

The post that creates the error is:

action   create
entity   entity_tag
json   {"entity_table":"civicrm_contact","entity_id":1,"tag_id":"2"}
Source
entity=entity_tag&action=create&json=%7B%22entity_table%22%3A%22civicrm_contact%22%2C%22entity_id%22%3A1%2C%22tag_id%22%3A%222%22%7D

Does this help with diagnosis?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Tag Error
March 13, 2014, 07:15:43 am
uh? looks like a valid json.

I see that I should have converted the tag id to an int before sending, but it hasn't any impact on the feature.

Can you compare with demo.civicrm.org see if you spot something different?

@colemans

you switched so CRM.api() use the json={...} syntax for all calls, even when there isn't any nested arrays?

FYI, on the node.js module, I kept the "normal" flat call by default, only use the json when they are sub arrays, to avoid giving json_decode any extra chance to fubar ;)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

bpuli

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.2.1
  • CMS version: Joomla 2.5.9
  • MySQL version: 5.0.96
  • PHP version: 5.3.14
Re: Tag Error
March 13, 2014, 07:59:51 am
Nope. I did a compare with the same action on demo.civicrm.org and there is absolutely no difference in the POST. Except for the entity_id, of course.

I am a complete loss as to why the error is happening.

BTW just did some experimentation and found that if I click on the Edit (record) button and scroll down to the Tags And Groups section and change the tags there and then hit the save button, it works with no error.

The error (and no saving of changes) only happens when I try to edit the tags from the Tags tab of the record.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Tag Error

This forum was archived on 2017-11-26.