Questions tagged [ajax]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
5
votes
2answers
327 views

Wordpress Ajax & pictures not loading after upgrade to 5.0

I've updated from 4.7.29 to 5.0.0 The SQL update went well, but I've issues with JS/Pictures not loading. This is really blocking as for example, the "Create new contact" is not loading See ...
3
votes
2answers
414 views

"SyntaxError: Unexpected token" error on l10n-js files

I have a Wordpress site (v4.2) and Civi 4.6.4 (although about to update). Every page on the public facing site generates a JS error (SyntaxError: Unexpected token '<') referring to wp-login.php ...
3
votes
2answers
32 views

Making a small application with the CiviCRM API

I'm currently trying to make a small web application in Cordova with which I can load memberships from my CiviCRM installation and display them. I already have access to my server url, the path, my ...
3
votes
2answers
181 views

activity dashlet not showing results

On the dashboard, the activity dashlet is not showing any results for me. I havent heard anyone on this system ever seeing results there. There is no ajax error, but the snippet it calls is civicrm/...
3
votes
1answer
194 views

Can I update/requery a custom field that got changed via another field on the same page?

I created some database triggers that update a read only custom field that is displayed on the main contacts page. You change the value in another field and the db triggers update the custom field. ...
3
votes
1answer
212 views

After upgrade to 4.7.13, I get 500 Internal Server Error when creating new mailing

After upgrading from 4.7.11 to 4.7.13 (with Drupal 7.51), I get à 500 error (Internal Server Error) on an ajax call when attempting to create a new mailing. The screen stucks at "Initializing..." The ...
3
votes
1answer
174 views

Tutorial for creating pages with ajax

For our CiviCRM instance, I use to create forms that allow the user to execute some specific tasks. Typically they end up on a form, they enter some values, and the postProcess function executes some ...
3
votes
1answer
60 views

Suppress default CRM.alert in hook_postProcess

Trying to figure out an answer to this question, have tried to just disable a default CRM.alert using CRM_Core_Session::setStatus(null, false); in hook_postProcess (defined in a drupal module), but ...
3
votes
2answers
882 views

Refresh page after closing modal opened by .crm-popup outside of CiviCRM

We've a page (in Drupal) outside of CiviCRM for "editors" (mean, users with restricted permissions) to perform some civicrm tasks. From this page civicrm forms is being opened in modal frame via ....
3
votes
3answers
126 views

Error when accessing Activities for contact (after upgrade to 4.7.2)

When a management user tries to open Activities tab for a contact he gets error message Error that I see when I try to trace it: API permission check failed for Case/getcount call; insufficient ...
2
votes
2answers
919 views

How to insert Javascript into an inline form edit via an extension?

Normally, if I want to inject a Javascript snippet into a form, I use a hook like in an extension like this: function alternateduplicatecheck_civicrm_buildForm($formName, &$form) { if($formName ...
2
votes
2answers
92 views

How to load custom css into admin popup boxes?

Many admin functions in Civi send the user to Ajax popup boxes. Eg on the Contact screen, Membership > Add membership, Events > Add Event... and many many more through the system. What is the best ...
2
votes
2answers
33 views

How to write unit tests for methods thsat echo instead of return (e.g., AJAX call handlers)

There are several methods in CiviCRM that just print their output directly to the buffer and then exit, because they're just sending an HTML snippet or other response for an AJAX call. For example, ...
2
votes
2answers
84 views

Quick search icon spins forever after upgrading from 4.4 to 4.5

The upper-left quick search box and the edit-in-place for contacts spin the loading icon forever but never do anything. Looking in the browser console, there is a JavaScript error. It worked just fine ...
2
votes
1answer
129 views

What are the security considerations before allowing access AJAX API to anonymous users?

We have an autocomplete-select list in one of our profiles that we want to use on a public page. I can see the call is blocked for anonymous users because of permissions on 'access AJAX API'. I'm ...
2
votes
2answers
161 views

Dashboard hangs; forces apache restart

This is in planning for upgrade to J!3. I have found no workable solutions here or elsewhere on the web. CiviCRM 4.6.4 Joomla 2.5.28 MySQL 5.5.38-1~dotdeb.0 Apache 2.2.16 PHP 5.3.29-1~dotdeb.0 Debian ...
2
votes
1answer
359 views

AJAX API permissions

We are using REST urls to pull data direct from Civi reports into Excel for analysis purposes. Within Civi the users are restricted via granular ACLs to specific groups of contacts. WP role ...
2
votes
2answers
117 views

How to use a CiviCRM generated form in an Android App

I'm programming an Android App for a company, and they use CiviCRM for subscribing to newsletters. The form is available to anyone online, but I have to add the form in an android app. On the android ...
2
votes
1answer
89 views

Ajax error with Manage Groups after upgrading to PHP 7.3, MySQL 8.0 and 5.22.0

I may have done too many upgrades at once but I was really eager to upgrade my environment following the release of Civi 5.22.0. I started out with upgrading my Civi Wordpress environment from 5.21.0 ...
2
votes
1answer
59 views

A contribution batch containing transactions of more than one currencies causes fatal error

My setup: CiviCRM 5.18.3 on Drupal 7. I created a Contribution batch. At transactions I chose two transactions of difference currencies e.g. HKD and USD and Assign them to a batch. Then I no longer ...
2
votes
1answer
970 views

What's the cause of this "Unexected token" JavaScript error?

Just did a fresh install of CiviCRM 4.6.5 on Drupal 7.38 and the JQuery/Ajax isn't working. I get the following 2 errors in the Chrome Developer Console: Uncaught SyntaxError: Unexpected token < ...
1
vote
5answers
944 views

Ajax Error when trying to view relationships tab

Civicrm 4.7.1 Joomla 3.4.8 I'm unable to view data in the relationships tab. I get the following errors: "DataTables warning: table id=DataTables_Table_0 - Ajax error." And "DataTables warning: ...
1
vote
2answers
50 views

Fetch Node data from drupal into CiviCRM

I am interested to know if it is possible to fetch node data from Drupal into CiviCRM. Is there anyway to do this? My End Goal is to to populate a "select list" with node titles from drupal and ...
1
vote
2answers
3k views

Mixed content error on SSL site

I'm trying to sort out an AJAX bug (edits to contacts not being saved) and the console error says: Mixed Content: The page at 'https://studentleadership.ca/wp-admin/admin.php?page=CiviCRM&q=...
1
vote
1answer
52 views

Problem with incoerent local currency in contribution

I have a problem after upgrading to civicrm 5.4.1 from 4.7 When I confirm the record of a payment for a contribution the operation goes on forever and I have to exit the page although when I enter ...
1
vote
3answers
88 views

https://docs.civicrm.org/dev/en/latest/framework/ajax/

I would like to open a modal with options editor inside (please see the screenshot below). I would like to call a custom JavaScript function whenever an option has been changed via that modal. By "...
1
vote
1answer
37 views

HowTo: crmApi get rows with date between

I want to get all memberships with start date between '2016-01-01' and '2016-06-01' using crmApi(). Here's my code that's not working: angular.module('angularmemberships').config(function($...
1
vote
1answer
116 views

How do I partially hide Ajax supplied content?

I tried hiding the edit, delete, enable and disable links in contact relationships writing an extension in the hook _civicrm_alterContent and injecting jquery: $content= $content . " <script ...
1
vote
4answers
102 views

Upgrade from 4.5.8 to 4.6.2 killed View Contact Tabs

We consult with CiviCRM powered by Drupal. Recently we upgraded one client who has CiviCRM powered by the latest Drupal 6 from 4.5.8 to 4.6.2. After the upgrade, they are unable to click between the ...
1
vote
1answer
32 views

DataTables warning: table id=dupePairs - Ajax error

Getting this error when running any merge rule in Civi 5.10.4. I tracked it down to a 502 ajax request failure triggered by this post: admin.php?page=CiviCRM&q=civicrm%2Fajax%2Fdedupefind&...
1
vote
1answer
144 views

CiviCRM AJAX api Permissions

Background I am working on a React app for event participation management using the CiviCRM ajax API. There is a little more to this that isn't relevant. Each user has access to their own API key, ...
1
vote
1answer
263 views

Ajax error when viewing relationships under IIS and Joomla (HTTP400 - invalid syntax)

This is similar to Ajax Error when trying to view relationships tab, but the analysis is different. It is not solved by increasing the request limits - they are much higher than the GET parameter. ...
1
vote
1answer
56 views

UI glitches and "Invalid Classname" error when editing summary fields via AJAX

When trying to edit fields on contact summary using AJAX hover method, the fields don't open up properly for editing (scroll bars are sometimes missing, and not enough space is revealed). On clicking ...
1
vote
3answers
328 views

AJAX error when viewing contact groups

Version 4.7.10 on Wordpress 4.6 Error when selecting Contacts->Manage Groups: DataTables warning: table id=DataTables_Table_0 - Ajax error. For more information about this error, please see http://...
1
vote
1answer
73 views

CiviCRM 4.7.4 breaks Ajax image upload

On Drupal 7.43 (fresh install) / CiviCRM 4.7.8 (same issue on 4.7.4) After enabling the CiviCRM module the ajax upload of a custom image field added to drupal user accounts stopped working. ...
1
vote
1answer
79 views

Suppress 'Unsupported locale specified to parseStreetAddress: en_GB' message

If debugging is enabled, 'Unsupported locale specified to parseStreetAddress: en_GB' message appears in some situations (add/edit contact), which scares non-techy editors. There are some ancient ...
1
vote
1answer
24 views

Why is isFrontend set differently for Profile in create mode vs HTML snippet?

I had trouble with ajax Country / State dropdowns in a profile used as an HTML snippet embedded in a Joomla page. The dropdowns worked fine in the profile in create mode. I realized that the HTML ...
1
vote
0answers
26 views

how to protect "dynamically by ajax generated .js-file"?

) i am a newbe with drupal7=>civicrm and found by chance an "open door" probably dynamically genrated by ajax: => https://{our domain}/crm/civicrm/ajax/l10n-js/ The browser shows this: ...
1
vote
0answers
56 views

Is it possible to return to the same contact summary page (ajax) once we have edited a contribution?

For example, when edit a one contribution in page 10 and save, return to page 10 and not to first page of contributions. Thanks.
1
vote
0answers
33 views

When filtering with data in civicrm/contact/view/case&reset=1 I get an error and no filtering

I have a problem in civicrm/contact/view/case&reset=1 when I use the date filter. I have an Italian localization with date format set to dd/mm/yyyy. I choose a date in the calendar and then I ...
1
vote
1answer
102 views

how to troubleshoot template/ajax/caching/otherweirdness issue re: multilingual upgrade

Thanks for the help in solving the problem! Nice to have all the ajax working properly again. Regarding the title of the question.... It seems like there's a (large?) gap between the errors I ...
1
vote
0answers
52 views

How can I use the AJAX API to create a Contact Us form?

I am attempting to interact with my CiviCRM backend using the AJAX API. I created a 'contact' page in WordPress, referencing a profile I created solely to load the CiviCRM javascript into my custom ...
1
vote
1answer
135 views

How can I change the fields displayed by dataTables?

I want to customize the information provided by templates that are generated via the dataTable plugin. Specifically, I want to alter the RelationshipSelector.tpl to display a contact's title and a ...
1
vote
0answers
116 views

Why do I have an error when trying to update relationship using CiviCRM API

Since this morning I'm running into something strange when using the API to update a relationship. Here is my code : CRM.api3('Relationship', 'create', { "sequential": 1, "id": 11, "...
1
vote
1answer
234 views

AJAX problem in CiviCase - Administer Case Types

I'm getting the same effect as reported here. I'm trying to set up CiviCase, and all seems fine except when I try to Administer->CiviCase->Case Types I just get blank screen. The JavaScript console ...
1
vote
0answers
18 views

Mail Accounts form fails to submit data

I have CiviCRM (4.6.3) plus CiviHR installed on a Wordpress 4.2.2 (multisite installation). I go to Administer=>CiviMail=>Mail Accounts. Then I try to create a new account or edit the default one. I ...
0
votes
2answers
198 views

Using Civicrm_api3 in onAjax[Name] plugin function

I created a plugin which provides custom validation for civicrm forms. Part of the jQuery validation on the plugin makes an AJAX call to the plugin. The plugin calls its onAjax[Name] method. In the ...
0
votes
1answer
46 views

Using fieldOptions with Custom Fields

I have a "Select list" within a Contribution Form. I want to populate the "Select List" with Custom Field values. I have created the Custom Group under Contacts, so i want to search all contacts and ...
0
votes
0answers
28 views

Contributions page - Endless Loop and Doubling Content - JS problem?

we have trouble with our civicrm contribution page since we updated to 5.16.3 (running in wordpress 5.2.4): the contributions page was running fine with paypal standard and a pay later option in the ...
0
votes
1answer
296 views

Ajax issues on WordPress

I think the issue is that Civi is (1) not enquing the versions of jQuery that come with WordPress and (2) the code is not written for noconflict mode. ?page=CiviCRM&q=civicrm/ajax/l10n-js/en_US&...