d6lts / drupal

Fork of Drupal core for Drupal 6 LTS support.
https://www.drupal.org
GNU General Public License v2.0
130 stars 45 forks source link

Drush 8.x does not work for some commands like `cc all` #68

Open EugenMayer opened 2 years ago

EugenMayer commented 2 years ago

I found the issue https://github.com/d6lts/drupal/issues/15 and assumed that drush8 support should actually be already there.

I installed drush via composer using

composer global require drush/drush:8.*

and also used the phar variant described in

https://docs.drush.org/en/8.x/install/

using

wget https://github.com/drush-ops/drush/releases/download/8.4.8/drush.phar

The result for cc all is the same

./drush.phar @localize cc all
No Drupal site found, only 'drush' cache was cleared. 
~/.config/composer/vendor/bin/drush @localize cc all
No Drupal site found, only 'drush' cache was cleared.

Interestingly, things like sqlc and uli do work, esp. the latter means, the context could be loaded and drush is aware of the installation.

Drush status looks like this

Drupal version         :  6.59                                                                                           
 Site URI               :  localize.lan                                                                                   
 Database driver        :  pgsql                                                                                          
 Database hostname      :  db                                                                                             
 Database port          :                                                                                                 
 Database username      :  dw_localize                                                                                    
 Database name          :  dw_localize                                                                                    
 PHP executable         :  /usr/bin/php                                                                                   
 PHP configuration      :  /etc/php/7.4/cli/php.ini                                                                       
 PHP OS                 :  Linux                                                                                          
 Drush script           :  /home/www-data/.config/composer/vendor/drush/drush/drush.php                                   
 Drush version          :  8.4.8                                                                                          
 Drush temp directory   :  /tmp                                                                                           
 Drush configuration    :  /home/www-data/.drush/drushrc.php                                                              
 Drush alias files      :  /home/www-data/.drush/all.aliases.drushrc.php /home/www-data/.drush/localize.alias.drushrc.php 
 Drupal root            :  /var/www                                                                                       
 Drupal Settings File   :  sites/default/settings.php                                                                     
 Site path              :  sites/default      

The drush alias looks like this

cat ~/.drush/localize.alias.drushrc.php 
<?php

$aliases['localize'] = array(
  'root' => '/var/www',
  'uri' => 'localize.lan',
  'strict'=> 0,
);
cat ~/.drush/all.aliases.drushrc.php 
<?php

$aliases['all'] = array(
  'root' => '/var/www',
  'site-list' => array(
    '@localize'
  ),
);

Also as bottom line, drush6 does work without issues.

Any hints what might be the cause?

EugenMayer commented 2 years ago

Maybe also a good addition is, without using the aliases, it will not work either

14df5786dcb1% pwd
/var/www/sites/default
14df5786dcb1% ~/.config/composer/vendor/bin/drush cc all
No Drupal site found, only 'drush' cache was cleared.