[J4] Please make a switch in the configuration to use the relative Joomla path for TEMP, LOG, MAIL instead of the absolute path. #28778
Replies: 32 comments
-
Doing this inside Joomla has two problems.
But you can create a |
Beta Was this translation helpful? Give feedback.
-
This is all clear. But the problem must be solved.
|
Beta Was this translation helpful? Give feedback.
-
If you have a solution I'm happy to review it. |
Beta Was this translation helpful? Give feedback.
-
Just BTW: There are tools out there that help you to rewrite the configuration.php detecting the absolute paths automatically... |
Beta Was this translation helpful? Give feedback.
-
Variant of solution.
No methods or conditions. You don't need to upgrade classes framework.
|
Beta Was this translation helpful? Give feedback.
-
Not a practicable solution. |
Beta Was this translation helpful? Give feedback.
-
Forget my last comment. I think you know that. |
Beta Was this translation helpful? Give feedback.
-
Any modules, any components, third-party plugins. Everything will still work. Nothing will change. |
Beta Was this translation helpful? Give feedback.
-
Provide a pull request please to the BTW: I don't understand why some people give themselves a thumb-up ;-) |
Beta Was this translation helpful? Give feedback.
-
@HLeithner |
Beta Was this translation helpful? Give feedback.
-
It's great if it's in J3. |
Beta Was this translation helpful? Give feedback.
-
And also in the logic of |
Beta Was this translation helpful? Give feedback.
-
Let's see what HLeithner will comment before you start and waste time in the wrong branch. |
Beta Was this translation helpful? Give feedback.
-
I don't know how to use GIT. |
Beta Was this translation helpful? Give feedback.
-
https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests |
Beta Was this translation helpful? Give feedback.
-
The new feature will not affect combat sites on J3. |
Beta Was this translation helpful? Give feedback.
-
Well we might can add it into 3.10 and 4.x to keep them behaving the same when possible. |
Beta Was this translation helpful? Give feedback.
-
Please add tooltip for field in com_config components. |
Beta Was this translation helpful? Give feedback.
-
I think need
2.Insert a check
Allows you to write custom paths using relative paths. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Well since I was mentioned I'm 👎 here because it is a totally bad idea to try and parse these fields and turn absolute paths into relative things using either Joomla's own path constants or PHP magic constants, and try to reverse engineer those into something that can be appropriately edited in the UI. Absolute paths are the best idea for these types of configuration. It sucks there isn't an easier way to go about it, but magic engineering to support PHP constants seems like it's going to create more problems than it fixes. |
Beta Was this translation helpful? Give feedback.
-
@mbabker You right. |
Beta Was this translation helpful? Give feedback.
-
I would say the current status quo is the good solution. These types of paths should be configured as absolute paths, I wouldn't put an option in the system where someone can save the logs path as just "/logs" and it work correctly, nor would I try to create overly complex code to try and do string replacements of the generated PHP code for the Yes, it is a pain to deal with when moving sites around between platforms, but it really isn't practical to try and change the handling of the configuration file in a way that makes relative paths a realistic option. If you want these types of relative paths, truthfully the most sane way to get them is to refactor Joomla's bootup sequence so it behaves more closely to that of WordPress' (where |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
To save time, this can only do this for J4. |
Beta Was this translation helpful? Give feedback.
-
Instead of doing this magic with constants I would suggest to create a bootstrap.php which create a |
Beta Was this translation helpful? Give feedback.
-
@HLeithner Beauty of the code We can do this check in bootstrap.php: |
Beta Was this translation helpful? Give feedback.
-
How logical is it for framework to have constants |
Beta Was this translation helpful? Give feedback.
-
@HLeithner
|
Beta Was this translation helpful? Give feedback.
-
This option is probably the simplest, lightest and most functional. |
Beta Was this translation helpful? Give feedback.
-
Dear developers, when transferring CMS to another folder or transferring to another server to another folder. There are problems with absolute paths TEMP, LOG, MAIL.
Please take measures to ensure that the CMS is not bound rigidly to the server path by default.
To have some switch in the CMS settings. For the switch to have 2 modes: The relative path of the CMS and the absolute path of the server.
The problem manifests itself when reserving all we clients ' sites. In fact, every site should have a backup copy. When deploying a copy or changing the server. Dozens of projects need to be reconfigured manually.
As well as when developing and transferring projects to another developer, each project needs to be reconfigured.
As well as when changing the hard drive on your PC. The reasons for changing the CMS location are many, this problem is global and affects everyone who installs JOOMLA.
Please make a switch in the configuration to use the relative Joomla path for TEMP, LOG, MAIL instead of the absolute path.
Beta Was this translation helpful? Give feedback.
All reactions