Follow up issue from #22336: Move all core Drupal files under a /core folder to improve usability and upgrades
Creating a symbolic link for the core folder breaks multiple scripts when trying to determine DRUPAL_ROOT as these all depend on the a fixed depth to the root folder based on the current path.
For example, in core/authorize.php.
chdir('..');
define('DRUPAL_ROOT', getcwd());
There were around 6 references in files such as core/install.php and core/modules/statistics/statistics.php, and 4 references in the scripts.
Without knowing what the repercussions are for the namespace declarations, the only solutions I can see are:
- to use a single point of entry from the real web root
- to revert the move for the core scripts and files back to the web root
- to ignore completely and document this in http://drupal.org/node/1327978
To replicate, install drupal with the core folder moved using a symobic link pointing to this folder. The settings file will be created relative to the real path to the core folder.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedYou can do the "use a single point of entry from the real web root" if readlink('.') returns !== FALSE.
Comment #14
smustgrave CreditAttribution: smustgrave at Mobomo commentedBrought this up in #yes-no-queue in slack and brought up this could be closed as a duplicate from catch
https://www.drupal.org/project/drupal/issues/1792310