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) »
  • Javascript error when saving edited Activity (SOLVED)
Pages: [1]

Author Topic: Javascript error when saving edited Activity (SOLVED)  (Read 2591 times)

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Javascript error when saving edited Activity (SOLVED)
October 19, 2014, 08:29:10 am
This issue is split off from a separate thread.

Since upgrading to 4.5, I get a javascript arror (see below) in the following situation: I call up the activity list for a contact, then edit one of the activities, then click SAVE, which returns me to the activity list for the contact, but the activity list has not been updated with the edited information - I have to reload the page before the information is updated.

Any ideas or suggestions?

Upon clicking SAVE, the javascript console shows the following error:


Code: [Select]
Uncaught TypeError: Cannot read property 'map' of undefined jquery.dataTables.min.js?r=pGwgA:122
p.tables.p.fnTables jquery.dataTables.min.js?r=pGwgA:122
CRM.refreshParent crm.ajax.js?r=pGwgA:556
m.event.dispatch jquery-1.11.1.min.js?r=pGwgA:3
r.handle jquery-1.11.1.min.js?r=pGwgA:3
m.event.trigger jquery-1.11.1.min.js?r=pGwgA:3
(anonymous function) jquery-1.11.1.min.js?r=pGwgA:3
m.extend.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.m.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.extend.trigger jquery-1.11.1.min.js?r=pGwgA:3
(anonymous function) crm.ajax.js?r=pGwgA:539
m.event.dispatch jquery-1.11.1.min.js?r=pGwgA:3
r.handle jquery-1.11.1.min.js?r=pGwgA:3
m.event.trigger jquery-1.11.1.min.js?r=pGwgA:3
(anonymous function) jquery-1.11.1.min.js?r=pGwgA:3
m.extend.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.m.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.extend.trigger jquery-1.11.1.min.js?r=pGwgA:3
e.Widget._trigger jquery-ui.min.js?r=pGwgA:6
(anonymous function) jquery-ui.min.js?r=pGwgA:10
(anonymous function) jquery-ui.min.js?r=pGwgA:6
m.extend.dequeue jquery-1.11.1.min.js?r=pGwgA:3
(anonymous function) jquery-1.11.1.min.js?r=pGwgA:3
m.extend.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.m.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.extend.queue jquery-1.11.1.min.js?r=pGwgA:3
e.Widget.(anonymous function) jquery-ui.min.js?r=pGwgA:6
e.widget.close jquery-ui.min.js?r=pGwgA:10
(anonymous function) jquery-ui.min.js?r=pGwgA:6
(anonymous function) jquery-ui.min.js?r=pGwgA:6
m.extend.each jquery-1.11.1.min.js?r=pGwgA:2
m.fn.m.each jquery-1.11.1.min.js?r=pGwgA:2
e.fn.(anonymous function) jquery-ui.min.js?r=pGwgA:6
$.ajaxForm.$.extend.success crm.ajax.js?r=pGwgA:426
t.success jquery.form.min.js?r=pGwgA:7
j jquery-1.11.1.min.js?r=pGwgA:2
k.fireWith jquery-1.11.1.min.js?r=pGwgA:2
x jquery-1.11.1.min.js?r=pGwgA:4
b jquery-1.11.1.min.js?r=pGwgA:4

« Last Edit: October 21, 2014, 03:36:10 am by jern »

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity
October 19, 2014, 12:25:06 pm
Just a thought - we only see this javascript error when editing activities. The activity table is by far the largest table in the database (230MB). Could this be causing the issue?

Actually, thinking about it, there are only 25,000 rows in the activity table, so 230MB seems quite large for that number of records. That's 10kB per row. Is that normal?

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Javascript error when saving edited Activity
October 19, 2014, 01:45:09 pm
Have you upgraded to 4.5.2?
Try asking your question on the new CiviCRM help site.

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity
October 19, 2014, 01:50:08 pm
Yes.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Javascript error when saving edited Activity
October 19, 2014, 03:11:32 pm
No I really don't think this is related to the size of your activity table.
I can't reproduce this so it seems specific to your site. Pretty bizarre that js can load the activity list but fails to re-load it.
Try asking your question on the new CiviCRM help site.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Javascript error when saving edited Activity
October 19, 2014, 04:51:29 pm
I would be willing to look into it a bit more if you want to send me admin credentials to log into your website.
Try asking your question on the new CiviCRM help site.

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity
October 19, 2014, 11:16:28 pm
Thanks very much. I have sent you a PM.

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Javascript error when saving edited Activity
October 20, 2014, 05:22:38 pm
Thanks for the login, that helped me track down the problem, which is a bug in jQuery.datatables.
I've fixed it for CiviCRM 4.5.3 and sent a pull-request to the dataTables project.
https://issues.civicrm.org/jira/browse/CRM-15502
Try asking your question on the new CiviCRM help site.

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity
October 21, 2014, 03:35:33 am
That's great. I made those PR changes, and it's working now. Thank you.

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity (SOLVED)
October 23, 2014, 09:07:31 am
Hmm. It may be a coincidence, but since I made those PR changes, MySQL has been using massive amounts of RAM. I suspect that CiviCRM may be the culprit, because nothing else has changed. When I restart the server, the memory usage ramps up and up, suggesting that something is not releasing memory when it should. Over a day or so, the server gradually grinds to a halt and eventually falls over. Any idea where I should look to verify what is causing this?
« Last Edit: October 23, 2014, 09:14:32 am by jern »

Coleman Watts

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 2346
  • Karma: 183
  • CiviCRM version: The Bleeding Edge
  • CMS version: Various
Re: Javascript error when saving edited Activity (SOLVED)
October 23, 2014, 10:57:24 am
I can't imagine how they could be related.

I suggest you look into slow query logging to try to track down the culprit.
Try asking your question on the new CiviCRM help site.

jern

  • I post occasionally
  • **
  • Posts: 46
  • Karma: 0
    • SEN Magazine
  • CiviCRM version: 4.5.8
  • CMS version: Joomla 2.5.28
  • MySQL version: 5.5.40
  • PHP version: 5.4.33
Re: Javascript error when saving edited Activity (SOLVED)
November 04, 2014, 02:04:00 am
Update: it turns out that the high RAM usage probably wasn't the main problem. It seems that the MySQL CPU usage, which normally bumbles along at about 3% or 4%, suddenly jumps to using all of the available CPU time (400%). I am trying to identify what happens at the time when MySQL suddenly goes mad, but no luck yet.

Has anyone else ever seen anything like this? This has only started happening since I installed CiviCRM 4.5. Any suggestions where to look for the source of the problem?

Thanks.

JonGold

  • Ask me questions
  • ****
  • Posts: 638
  • Karma: 81
    • Palante Technology
  • CiviCRM version: 4.1 to the latest
  • CMS version: Drupal 6-7, Wordpress 4.0+
  • PHP version: PHP 5.3-5.5
Re: Javascript error when saving edited Activity (SOLVED)
November 11, 2014, 05:59:46 am
I'd check the slow query log: http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html
Sign up to StackExchange and get free expert CiviCRM advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Javascript error when saving edited Activity (SOLVED)

This forum was archived on 2017-11-26.