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) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Current Employer Autocomplete
Pages: [1] 2

Author Topic: Current Employer Autocomplete  (Read 4867 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Current Employer Autocomplete
July 16, 2012, 06:49:48 pm
X - many thanks for your work on this extension

My testing
- admin gets an autocomplete in an Event - but is not limited to contacts
- admin gets text field in profile Edit
- anon who has Ajax API permission gets text field

So am guessing I haven't quite got the nail and the hammer aligned.

this is what is in my civicrm.settings.php

$civicrm_setting['eu.tttp.publicautocomplete']['params'] = array('contact_type'=> 'Organisation', 'contact_sub_type' => 'Party',  'return'=>'sort_name,nick_name,country');

as compared to this from your git instructions

$civicrm_setting['eu.tttp.publicautocomplete']['params'] = array('contact_type'=> 'Organisation', 'contact_sub_type' => 'members', 'group' => 42, // active groups return=>'sort_name,nick_name,country');

note that yours has no ' around return

this was on a 4.1.3

i cleared drupal and civicrm caches - any other thoughts? will try and catch you on irc in 20 hours or so
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Current Employer Autocomplete
July 17, 2012, 08:27:41 am
Oops, should be Organization in the type

What's the url on profile edit?

you are using a profile with a current employer and that's this field you are using, right?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Current Employer Autocomplete
July 17, 2012, 03:35:07 pm
Hi,

The buildform hook isn't being called. Is it reasonable to expect it to be called on an extension in 4.1?

Eileen
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Current Employer Autocomplete
July 17, 2012, 06:27:24 pm
A) Eileen, are you saying the hook isn't being called at all? Or it's not being called in the necessary context? That hook has been around a long time - it should work on 4.1.

B)  One possible problem is the settings statement. 4.1 and 4.2 have different approaches to hard coding settings - 4.1 uses define() (which only accepts scalar values) and 4.2 uses the global $civicrm_setting (like drupal - and which accepts complex data). Compatibility was dropped on the theory that the user base was very  small and highly technical. If that's a problem, let us know during the beta cycle.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Current Employer Autocomplete
July 17, 2012, 07:18:05 pm
1) - it's not being called in the extension from what I can see - which is not a drupal module - where I think it would be callled

2) the setting for this module is perhaps not compatible with d6 style

Code: [Select]
global $civicrm_setting;
$civicrm_setting['eu.tttp.publicautocomplete']['params'] = array('contact_type'=> 'Organization', 'return'=>'sort_name,nick_name,country');
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: Current Employer Autocomplete
July 17, 2012, 09:34:22 pm
Eileen and I discussed this on IRC and created http://issues.civicrm.org/jira/browse/CRM-10543

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Current Employer Autocomplete
July 17, 2012, 10:04:27 pm
which resolves the extension loading issue (but not yet me getting the extension working)
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Current Employer Autocomplete
July 17, 2012, 11:26:10 pm
thanks guys

fwiw - the autocomplete i had firing when i first installed this, was providing results after searching email - not sure if that was the plan but think it is not ideal, should only search Org Name imo
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Current Employer Autocomplete
July 18, 2012, 08:20:33 am
So to clarify the "works for me"

Did it using on civi4.2

Is the hook called? does it inject anything in the page?

Can you pull the latest version, changed a few things

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Current Employer Autocomplete
July 18, 2012, 09:49:55 am
I haven't diagnosed what isn't working yet - but it's at the js level - once it loads my js seems to stop working - I need to look further - but will git pull
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Current Employer Autocomplete
July 24, 2012, 02:07:30 am
DO you have a js error (on load or when typing?)
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

admsh

  • I’m new here
  • *
  • Posts: 13
  • Karma: 1
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.12
  • MySQL version: 5.1.53
  • PHP version: 5.3.2
Re: Current Employer Autocomplete
November 03, 2012, 08:18:44 am
Is this a "real" extension? Where can it be obtained? Were these problems ever solved?

diegov

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
    • dotPro Tecnologia e Comunicação
  • CiviCRM version: 4.3.5
  • CMS version: Joomla! 3.1.x
  • MySQL version: 5.3
  • PHP version: 5.3
Re: Current Employer Autocomplete
April 14, 2013, 09:11:58 pm
Hi,

Tried it from https://github.com/TechToThePeople/publicautocomplete in the brand new CiviCRM 4.3.0 on Joomla!.

Couldn't make it work. After the installation, the profile won't load anymore (nothing about it on the html page code... no error). Also, the extension uninstall didn't work, just give a blank page. That forced me to restore the site to a previous backup.

Mr. Xavier, ppl @ tttp, any chances about making that extension work again, maybe putting it available at extensions dir? I could offer a little "sponsoring" on that.

Thanks,
Diego

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Current Employer Autocomplete
April 14, 2013, 09:55:44 pm
Hi,

Will check at the end of this week on 4.3 and come back to you

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

diegov

  • I post occasionally
  • **
  • Posts: 63
  • Karma: 0
    • dotPro Tecnologia e Comunicação
  • CiviCRM version: 4.3.5
  • CMS version: Joomla! 3.1.x
  • MySQL version: 5.3
  • PHP version: 5.3
Re: Current Employer Autocomplete
April 15, 2013, 07:15:05 am
Thank you very much!

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • Current Employer Autocomplete

This forum was archived on 2017-11-26.