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) »
  • API Deployment - How to Register new API method?
Pages: [1]

Author Topic: API Deployment - How to Register new API method?  (Read 791 times)

nigel_currie

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
API Deployment - How to Register new API method?
November 22, 2013, 01:00:39 pm
Hello!

I've created an API method that gets membership end dates for a given membership type using civix. It's working fine on my local dev server, but it's not getting recognised when I move it up to the staging box. What do I need to do on staging to get it working?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: API Deployment - How to Register new API method?
November 22, 2013, 01:48:11 pm
enable the extension should be good enough.

What's the api you created? new entities might be more tricky, but probably not the issue there
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

nigel_currie

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
Re: API Deployment - How to Register new API method?
November 22, 2013, 01:55:53 pm
The module is enabled. I've implemented a few hook methods in my module too and they're working fine, it's just the API method that isn't. The method handles the MembershipType entity and takes a membership type id as a parameter - pretty simple.

As I say it's working fine on my WAMP dev server, but not on my linux staging server. I remember reading someplace about a capitalization bug in civix, so I think that might be the problem. Can't find where I read that though, or how to fix!

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: API Deployment - How to Register new API method?
November 22, 2013, 10:10:44 pm
is the code on github/public place?
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

nigel_currie

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
Re: API Deployment - How to Register new API method?
November 23, 2013, 03:49:48 am
I've just put the extension directory up on github:

https://github.com/northwind2/ricmondcustom/tree/master/uk.co.richmondfc/extensions/richmondcustom

I'd really appreciate it if you could take a look over it.
« Last Edit: November 23, 2013, 03:51:24 am by nigel_currie »

nigel_currie

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
Re: API Deployment - How to Register new API method?
November 25, 2013, 10:28:00 am
Still stuck on this.

I'm running PHP 5.4 on my dev WAMP server, 5.3 on Ubuntu staging. Is that likely to be an issue?

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: API Deployment - How to Register new API method?
November 25, 2013, 12:00:41 pm
try renaming GetEndDate.php into Getenddate.php
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

nigel_currie

  • I’m new here
  • *
  • Posts: 21
  • Karma: 1
Re: API Deployment - How to Register new API method?
November 25, 2013, 12:53:47 pm
Yes, excellent - that's working now.

Is this a civix bug, then?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Extensions (Moderators: mathieu, totten, kasiawaka) »
  • API Deployment - How to Register new API method?

This forum was archived on 2017-11-26.