1

I have CiviCRM 4.7 installed on drupal 7.38. I Found it necessary to modify the url in civicrm.settings.php file as suggested here:
https://forum.civicrm.org/index.php?topic=33303.0
After this modification, my extension was successfully created and I enabled it. Also I have added a page and can already pull some data from the database using the CiviCRM api and display it on the page I added. I now intend to add an api function for an already existing entity, FinancialItem.
When I run the command(in the terminal):

civix generate:api FinancialItem Create

I get the following errorenter image description here

Any suggestions as to what I should do to fix this?

  • 1
    Suggestion 1: You shouldn't need to sudo to run civix. My advice to those who often run sudo is: stop, understand and address the underlying permissions problem, rather than whacking it with a "sudo hammer". Reflexive sudo-ing is a habit worth kicking. – Chris Burgess Apr 17 '16 at 3:14
  • 1
    Suggestion 2: Drupal 7.38 is harmless enough for developing locally, but if you'll be using the same codebase on the internet, you should ensure you're running a recent copy of Drupal with all available security updates applied. – Chris Burgess Apr 17 '16 at 3:19
1

This looks like your CiviCRM install has an extension enabled in the DB which is not present, or was moved, on your disk.

Perhaps the extension you're working on was renamed after first being enabled, perhaps other changes were made to info.xml or the core extension files, perhaps it was moved, or perhaps your DB had another extension enabled on the remote server which isn't present locally.

The CiviCRM extensions page might be informative to check, otherwise you can compare extensions listed in the database to the ones which are available locally.

0

From the image you are using an extension that has an API with the name FinancialItem and You are trying to add an API that already exists in the extension with the same name in the extension cm.mukwetest.firstextension.

I don't think that is possible.

You the github repo is found here https://github.com/mercimukwe/cm.mukwetest.firstextension to see the content whole extension and the APIs which have been added.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.