Magento - Data stream error - path "path / filename.csv" is unavailable and cannot be used

I get an error in Magento when I try to use the Dataflow export function.

Path "path/filename.csv" is not available and cannot be used.

This function worked fine before, so I donโ€™t know what might be wrong. I checked the permissions on the folder and files and they are beautiful (777). In addition, I tried to delete an existing file or try different path names and still not play dice.

After a few more tests, it seems that this happens only with the path that I personally created. When using a path created by Magento, such as var / export, it works fine.

+4
source share
5 answers

Afaik this is due to some data flow changes around 1.4 or 1.5, where Varien began to restrict the data flow profiles for the Local Server type to specific folders and files:

 array( 'export_xml' => 'var/export/*/*.xml', 'export_csv' => 'var/export/*/*.csv', 'import_xml' => 'var/import/*/*.xml', 'import_csv' => 'var/import/*/*.csv' ); 

With Magento's default settings, this means that your export files must be inside var/export or one of its subfolders, such as `var / export / mydir / my.csv '.

Magento 1.5.1 actually shows the corresponding prompt in the Profile Wizard:

(For the type "Local server" you must use the relative path to install Magento var / export or var / import, for example. Var / export, var / import, var / export / some / dir, var / import / some / dir)

I was only looking at the source code, but I suppose to use your own paths outside of var/export you need to override Mage_Core_Model_File_Validator_AvailablePath::isValid() and / or override Mage_ImportExport_Helper_Data::getLocalValidPaths() .

It will be easier to use symbolic links (thanks @ColinM for mentioning this), but this, of course, will only work on systems where the use of symbolic links is allowed / activated.

+2
source

No need to override Mage_ImportExport_Helper_Data::getLocalValidPaths()

Just add the config.xml file to the standalone module

 <config> <default> <general> <file> <importexport_local_valid_paths> <available> <my_new_path_to_csv>var/import/*/*.csv</my_new_path_to_csv> </available> </importexport_local_valid_paths> </file> </general> </default> </config> 

This problem should be solved in this way.

+2
source

I ran into this problem after upgrading from Magento 1.4 to 1.7. File names are more restrictive. To make sure that you are using the correct file name, simply delete the contents of the file name field in your export profile. Then Magento will automatically add a valid file name when saving the profile.

+2
source

If you are using a hosted server with a large provider, sometimes due to security concerns, chmod 777 not allowed. Try 755 in the folder and see if this fixes the problem.

0
source

I disabled the file extension. I added .csv at the end and everything was fine.

0
source

All Articles