Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When running an export into CSV using drush, it wont export my image urls as absolutes paths, but when I run it with batch it does. (See attached files)
Any clues why it behaves like that, I really need to do this using drush.
Thankful for help
Comment | File | Size | Author |
---|---|---|---|
#2 | absolute_path_drush_attribute-1828262-2.patch | 922 bytes | xamanu |
#1 | absolute_path_drush_attribute-1828262-1.patch | 620 bytes | xamanu |
drush_csv.png | 100.09 KB | Bonaveli | |
batch_csv.png | 114.17 KB | Bonaveli |
Comments
Comment #1
xamanu CreditAttribution: xamanu commentedThe problem is that when using absolute paths the current position is getting popped to the front:
'output_file' => realpath(drush_get_context('DRUSH_OLDCWD', getcwd())) . '/' . $output_file,
Attacjed you can find a patch that makes it just simpler, codewise, and should work. Please review if this would not cause other problems.
Comment #2
xamanu CreditAttribution: xamanu commentedWith some further testing I had problems to create files which did not exist before. So here a new patch.
Comment #3
junedkazi CreditAttribution: junedkazi commentedThis issue is not with views data export drush. Please refer to this issue #743368: $GLOBAL['base_url'] set to http://default. The solution should be in your drush command pass the site url using the -l or --uri param.