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 »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Misc issues
Pages: [1]

Author Topic: Misc issues  (Read 908 times)

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Misc issues
January 19, 2015, 06:55:36 am
(not sure if this is the correct forum, move as needed)

I'm running civi 4.5 that was upgraded from a minimal 4.4 install on Joomla 2.5. Several issues have accumulated and I'm stuck debugging them (not a webdev guy). In no particular order:

1. Can't assign relationships (anymore?), except through import. The js popup where you select the other party (where you can search or create new contacts) never gets populated. Like it wasn't passed any data. Typing a name out fully doesn't help, nothing is recognized.

2. I can't disable the mailing footer. I've disabled the fact that it's required everywhere, but in the "Headers, Footers, and Automated Messages" page I can't make it non-default. Or disable it also there for that matter. The dialog opens, but nothing changes on save.

3. I can't input tags into tag sets. Works fine on demo (newer joomla there though). Perhaps related to https://issues.civicrm.org/jira/browse/CRM-15717 (yes, subtype of org)? What happens is that the first new tag I enter is fine, gets converted to the gray block version with an X to delete it, but any extra tag gets removed right after entry (there's just enough of a delay to see it getting converted to the grey block). Even just entering one is no good, as after confirmation, nothing gets saved. It's the same through the dedicated dialog and through the inline form on the profile page.

I'm the admin, so 1 and 3 can't be the same as http://forum.civicrm.org/index.php/topic,34971.0.html .

Any pointers on what to do, where and how to inspect further would be great. I know the browser consoles have some js tooling, but that's about it.
« Last Edit: January 19, 2015, 07:06:57 am by lynx »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Misc issues
January 19, 2015, 07:09:38 am
Please check the browser console for errors. One common problem is that if you have php "on screen" errors/warnings enabled in php.ini (we recommend you turn this off) then it can spit a bunch of warnings into your ajax responses and prevent the browser from being able to read them correctly.
Try asking your question on the new CiviCRM help site.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 19, 2015, 07:44:11 am
The tag set one gives me a series of these in old opera for linux, but it's a css thing:
Quote
Unknown pseudo class
  [id='sizzle-1421681075364'] .crm-accordion-header:first

I couldn't find any similar display in the chromium console, but looking at loaded resources showed that one request (from select2) got cancelled (just before a json one succeeded).
Quote
=civicrm/ajax/rest&entity=contact&action=getlist&json=%7B%22params%22%3A%7B%22contact_type%22%3A%22Organization%22%7D%2C%22input%22%3A%22e%22%2C%22page_num%22%3A1%7D&_=1421681952839   GET

Is that what you meant? I don't see where I could check for errors directly, save by setting breakpoints.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Misc issues
January 19, 2015, 07:54:52 am
To inspect the results of ajax requests:
In Chrome you have to enable the "Log XMLHttpRequests" option in your console preferences
In FF this is enabled by default.
Try asking your question on the new CiviCRM help site.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 19, 2015, 08:20:32 am
Thanks. Typing something in the contacts field:
Quote
XHR finished loading: GET "http://ebm.si/o/administrator/?option=com_civicrm&task=civicrm/ajax/rest&en…on%22%7D%2C%22input%22%3A%22fox%22%2C%22page_num%22%3A1%7D&_=1421683210622".
jquery-1.11.1.min.js?r=UBlAK:4m.ajaxTransport.send
jquery-1.11.1.min.js?r=UBlAK:4m.extend.ajax
select2.min.js?r=UBlAK:21(anonymous function)

going deeper shows {"is_error":1,"0":"error_message","1":"Unable to decode supplied JSON."}. I can't find where the problematic json is displayed though. The cancelled requests earlier can be ignored, as they were part of the autocompletion routine.

I tried putting "ini_set('display_errors', FALSE);" in both civicrm.settings.php (why two anyway?), but it changed nothing. Did you mean something else?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Misc issues
January 19, 2015, 08:25:27 am
The json is encoded in the url of the get request. I can't quite see it all though it looks like either the forum truncated it or your copy-paste only got part of it.
Try pasting in just the part starting with task=civicrm/ajax/rest as what follows is the important bit.
It does look kind of funny though, as if it's been url-encoded too many times. Compare that request with what you see if you do the same thing in our public demo site.
Try asking your question on the new CiviCRM help site.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 19, 2015, 08:30:32 am
The decoded json in the query string is displayed fine:
json:{"params":{"contact_type":"Organization"},"input":"fox","page_num":1}

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Misc issues
January 19, 2015, 08:33:40 am
It would be interesting if you stuck a debug statement inside CRM/Utils/REST.php next to that error message (search for the string "Unable to decode supplied JSON.") to find out why it's crashing.
Try asking your question on the new CiviCRM help site.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 19, 2015, 09:00:04 am
$requestParams['json'] is as above, just with some escapes:
Code: [Select]
{\"params\":{\"contact_type\":\"Organization\"},\"input\":\"fox\",\"page_num\":1}
json_last_error() returns JSON_ERROR_SYNTAX. Stripping the backslashes with str_replace actually got me further, one ok response (capital s caron there):
Code: [Select]
{"is_error":0,"version":3,"count":1,"id":0,"values":[{"id":"65924","label":"\u0160entrupert","description":["obcina@aaasentrupert.si"],"icon_class":"Organization"}],"page_num":1,"more_results":false}
That's nicely reproducible also with other data, but the dropdown still isn't getting populated.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 19, 2015, 01:03:29 pm
2. Nothing interesting pops up. Just went and toggled it in the db.

3. Succesfully creates a child tag for the first tag, but not the rest. On second use it claims the tag already exists in the tag table, but I bet the code handles that. The assignment to a contact does not persist through a page reload though (neither the inline tag set nor the one in the edit form). Didn't see anything interesting on edit form save.
By inputting a valid child tag, I get the same autocomplete problem as was discussed in the previous post.
« Last Edit: January 19, 2015, 01:16:07 pm by lynx »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Misc issues
January 20, 2015, 08:21:59 am
Hmm, I wonder if the escapes are a joomla thing, or possibly a misconfigured php environmental variable. The latter theory might explain why random-seeming ajax calls are failing.
Try asking your question on the new CiviCRM help site.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 20, 2015, 08:39:30 am
well if you need a phpinfo or similar dump, just let me know. Also, any ideas on why autocompletion is not working even after fixing this json error?

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 20, 2015, 09:30:04 am
Actually, I just disabled all my debug prints around the fix and autocomplete works again. Didn't realize it was offered in so many places. Both tag sets and relationships are fine now. :)

So basically just the escaping issue remains.

lynx

  • I’m new here
  • *
  • Posts: 20
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: Joomla 2
  • MySQL version: 5.5.40
  • PHP version: 5.3.29
Re: Misc issues
January 24, 2015, 06:07:53 am
Follow up here (you can just disable magic_quotes_gpc):
http://forum.civicrm.org/index.php/topic,35485.msg150885.html#msg150885

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Misc issues

This forum was archived on 2017-11-26.