I haves dev setup of a site that i want separate craft config, db and plugin folders for.

define('CRAFT_CONFIG_PATH', '../../../craftdevconfig/');
define('CRAFT_PLUGINS_PATH', '../../../craftdevplugins/');
define('CRAFT_STORAGE_PATH', '../../../craftdevstorage/'); //'../storage/');
define('CRAFT_TEMPLATES_PATH', '../craft/templates/');

I am trying to debug a plugin in craftdevconfig.

However I am having a nightmare knowing where craft is looking. For my plugin it seems to get its default configuration from the live craft/plugins folder. But for code changes, seems to change its mind about where the plugin service calls should be found. I can debug it locally as it has IP based service calls to third parties. Slowly going bald.

Any ideas on how to clarify where craft thinks stuff is would be great

  • Not sure I'm following 100%. CRAFT_CONFIG_PATH just allows you to override where the craft/config folder lives by default. "I am trying to debug a plugin in craftdevconfig." Are you saying your plugin is providing its own config settings and you're having a hard time figuring out how to provide those? – Brad Bell Feb 21 '17 at 18:59
  • Im saying - to craft - here is my plugin folder define('CRAFT_PLUGINS_PATH', '../../../craftdevplugins/'); and its getting its settings from '../../../craft/plugins/[name]/config.php – joomkit Feb 22 '17 at 7:57

A plugin that has config settings can provide the default values for those settings in plugins/pluginHandle/config.php.

Since you've defined CRAFT_PLUGINS_PATH as craftdevplugins, that would be craftdevplugins\pluginHandle\config.php.

End users can set can set custom values in config/pluginHandle.php. Since you've defined CRAFT_CONFIG_PATH as craftdevconfig, that would be craftdevconfig\pluginHandle.php.

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.