I have just installed Refbase but have found that I cannot upload pdf files if the original filename contains space characters. renameUploadedFiles="yes" and if I upload a file without space characters it is renamed correctly. If I surround the name of the file to be imported in the "Browse" cell it is imported correctly. Is there a configuration to automatically apply these quotes ? Should this be a feature request (or bug report) ? Thanks for what looks like a great package - Nick
Further to this:
- Refbase is hosted on Ubuntu 7.04
- Upload is from Firefox 2.0 under Windows XP
- Also does not like Windows \ characters in file paths, and gives error
Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /var/www/vet/refbase/includes/include.inc.php on line 3631
Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in /var/www/vet/refbase/includes/include.inc.php on line 3634
Warning: Cannot modify header information - headers already sent by (output started at /var/www/vet/refbase/includes/include.inc.php:3631) in /var/www/vet/refbase/modify.php on line 1046
I'm not sure I entirely understood what you exactly did. Are you saying that you've set variable '$renameUploadedFiles' (in 'initialize/ini.inc.php') to "yes", and that you still cannot upload files that contain a space? Also, upload of files works when you surround the file name with quotes? Is this what you're saying? If so, does the file get renamed according to the rules defined in variables '$dirNamingScheme' and '$fileNamingScheme'?
Did you modify the value of variable '$allowedFileNameCharacters'? If so, how?
On the "Unknown modifier" error message, please see here for advice on how to fix this:
After correcting this "Unknown modifier" problem, can you now upload files and have them renamed appropriately?
Thank you Matthias,
Your interpretation is exactly correct, and the file did get renamed according to the rules. I had not changed $allowedFileNameCharacters from the installation default.
However I have now corrected the "Unknown modifier" problem as per your instructions and it is uploading files perfectly, including those with space characters in the name, and without surrounding quotations.
Thanks for your help
> I have now corrected the "Unknown modifier" problem as per your
> instructions and it is uploading files perfectly, including those
> with space characters in the name, and without surrounding
I'm glad that this fixes all of your upload issues.
We should have issued a release a long time ago, this is basically my fault, sorry for the inconvenience! However, we're making good progress towards the next release which will have a good assortment of features and fixes.
I get the same warnings when adding PDF file, even if the filename is without special characters. Can you duplicate instructions on fixing this problem here, because I can not open refbase.net?
the refbase.net server has been flaky during the past 24 hours, sorry for the inconvenience. refbase.net seems to work again, so please see:
In short, to fix your issue, please open file 'modify.php' in your refbase root directory, goto line 1100 and replace this code:
$dirNamingScheme = trimTextPattern($dirNamingScheme, "[/\\]+", true, true);
$dirNamingScheme = trimTextPattern($dirNamingScheme, "[\/\\\\]+", true, true);
Alternatively, upgrade to the refbase SVN version which does not has this problem.