Say I when I'm setting the dump path I type ',,./demo' when I meant to type '../demo', an error is thrown

The directory ,,./demo does not exist.

. This is fine, but when I type in the correct dump path ("../demo") it throws 2 error message

* The directory ,,./demo does not exist.
* The settings have not been saved because of the errors.

I am not able to set the right dump path until I create a directory call ,,./demo

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Sivaji_Ganesh_Jojodae’s picture

Title: Cannot create dump path directory because of typing in wrong directory first time » dump path settings throws error for custom path
Version: 6.x-1.4 » 6.x-1.x-dev
Status: Active » Needs review
FileSize
2.08 KB
42.97 KB

I confirm this bug. I came across this when i am working on #678792: Drush integration for demo module and managed to fix it by running statement variable_get('demo_dump_path', file_directory_path() . '/demo')

One of the ways to reproduce this
1. Submit the dump setting form in page admin/build/demo with empty dump path.
2. Now you will see error message like

The directory  does not exists.
The settings have not been saved because of the errors.

(For instance see the attached snapshot)
3. Now you can not stop the above error message even if you input the correct path (say 'sites/default/files/demo' or '../writable_dir') neither by clicking the restore the form to default button.

I have attached a patch which fixes this bug for me.

(This bug affects only 6.x)

zeropaper’s picture

I did not try the patch, but hard-coding the demo_dump_path variable within my settings.php did the trick.

sun’s picture

Status: Needs review » Fixed

Thanks for reporting, reviewing, and testing! Committed the first two patch hunks to D6.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.