Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path in MODx config files #7366

Closed
eprochasson opened this issue Mar 15, 2012 · 8 comments
Closed

Path in MODx config files #7366

eprochasson opened this issue Mar 15, 2012 · 8 comments
Labels
area-setup proposal Proposal about improvement aka RFC. Need to be discussed before start implementation.

Comments

@eprochasson
Copy link
Contributor

eprochasson created Redmine issue ID 7366

The config files generated by MODx (/config.core.php, /manager/config.core.php, /connectors/config.core.php and /core/config/config.inc.php) includes absolute path.

As it works perfectly with a new install, I assume I'm not the only one who have a local version for development and a live version on a different server, with different config files (because different paths).

Is there a reason to not use automatically generated path in those config files, assuming most of the developer use the standard MODx file structure anyway.

For example, /config.core.php can be:

That makes the deployment of any website way easier (you just have to change the database information). Power user with a specific file structure can still change those information manually if required.

@eprochasson
Copy link
Contributor Author

eprochasson submitted:

I modified the template config file and the resolvers for building the transport package to have relative path config files. However, that will conflict with the new setup process (which allow to change paths) as it will always use the default, relative path. I therefore doubt that it can be merged, but in case, it's here.

In my opinion, the case where one moves a modx installation to a different server (I typically develop locally then deploy to a remote server with different paths) is way more common than someone having special path needs, but I might be wrong.

Commits are available on github, for the resolvers:
eprochasson@ac762ca
For the config file:
eprochasson@bc90ca6

Thank you !

@modxbot
Copy link
Contributor

modxbot commented Aug 15, 2013

everettg_99 submitted:

Yes, simplified configs would be helpful.

  1. Use relative paths when possible.
  2. Update config.inc.php to avoid needless hard-coded paths. E.g. can't we always leave the MODX_CORE_PATH setting to be relative because the config.inc.php always lives in the core directory? Surely it can find itself:
if (!defined('MODX_CORE_PATH')) {
    $modx_core_path= dirname(dirname(__FILE__)).'/';
    define('MODX_CORE_PATH', $modx_core_path);
}

@whitebyte
Copy link

Core config now uses relative pathes AFAIK, and pull requests are no more actual, 2.3+ doesn't have _build/resolvers/resolve.connectors.php at all, so suggest closing

@eprochasson
Copy link
Contributor Author

That, or the fact that the question was raised in 2012.

@whitebyte
Copy link

We just trying to sort out old issues that was imported from redmine

@OptimusCrime
Copy link
Contributor

I would +1 for closing. No longer relevant.

@whitebyte
Copy link

Also, #9252 is possible duplicate and should be closed too

@adamwintle
Copy link

This is no longer relevant @modxbot close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup proposal Proposal about improvement aka RFC. Need to be discussed before start implementation.
Projects
None yet
Development

No branches or pull requests

5 participants