0

I'm developing my first extension (through civix) which contains a custom form and a specific menu item linking to the form. All was working until today, but suddenly, the page URL is no more reachable, the URL is sometime redirected to the home page, sometime a path warning error is displayed. I tried to uninstall and reinstall the extension, but unsuccessfully. What can i do?

Thanks Marcello

  • What does the path warning error say? Is anything reported in your logs? – Aidan Apr 4 '16 at 10:29
  • The warning (I cannot reproduce it anymore) told that the form .php page (UploadData.php) was non reachable, In the message there were all path of the other extensions except my one. Eg: custom_ext\all_other_extension_name\CRM\Bollettinipostali\Form\UploadData.php The log stay empty – marcello Apr 4 '16 at 12:10
1

Try updating the file perms of the new extension and then clearing cache :)

  • Thanks JohnnFF, I set permissions to 'access CiviCRM, administer CiviCRM' and cleared the cache but it does not works. My idea is there is something wrong in the path. I can debug source, does someone have an idea where I can start from? – marcello Apr 5 '16 at 6:08
1

So, as always, plenty of reasons that can explain why something goes wrong.

It might be that your extension is not taken into account ->try to die("here") on the main php of your extension, just to be sure it's properly used

It might be that your new page isn't taken into account -> try to rebuild menu, see if helps

or plenty of other reasons, but I'd start with these two ;)

1

Ps, next time please add more info to original question!

Under Administrator menu you will see 'directories and paths' and 'resources'. Please set these.

Also, when I said file permissions, I meant on the actual foldee, i.e., in Windows, not civi. But you probably don't need to do that if you set the above properly and clear cache :)

0

Thanks to all I solved it! debbuging the code I noticed how, installing/disintalling the extension, the record in civicrm_menu table was missing. I recreate it manually and for a while all worked but ....

Now I found the following new error:

( ! ) Fatal error: require_once(): Failed opening required 'CRM\Bollettinipostali\Form\UploadData.php' (include_path='.;C:/localhost/drupal/sites/all/modules/civicrm;C:/localhost/drupal/sites/all/modules/civicrm\packages;.;C:\localhost\drupal\sites\all\modules\civicrm;C:\localhost\drupal\sites\all\modules\civicrm\packages;C:\localhost\drupal\sites\all\modules\civicrm\vendor/phpseclib/phpseclib/phpseclib;.;C:\php\pear') in C:\localhost\drupal\sites\all\modules\civicrm\CRM\Core\Controller.php on line 451

In some way my extension folder is not in the include_path

0

I solved! I foolishly deleted some functions (eg. _alterSettingsFolders, ) in the base php. Thanks to all for your interest

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.