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

Files: 
CommentFileSizeAuthor
#2 absolute_path_drush_attribute-1828262-2.patch922 bytesxamanu
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]
#1 absolute_path_drush_attribute-1828262-1.patch620 bytesxamanu
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]
drush_csv.png100.09 KBBonaveli
batch_csv.png114.17 KBBonaveli

Comments

xamanu’s picture

Title:Absolute paths does not work on my drush?» Support absolute paths in drush output_file argument
Version:7.x-3.0-beta6» 7.x-3.x-dev
Component:User interface» Code
Category:task» feature
Status:Active» Needs review
StatusFileSize
new620 bytes
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

The 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.

xamanu’s picture

StatusFileSize
new922 bytes
PASSED: [[SimpleTest]]: [MySQL] 78 pass(es).
[ View ]

With some further testing I had problems to create files which did not exist before. So here a new patch.

junedkazi’s picture

Status:Needs review» Closed (duplicate)

This 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.