Versions: OC looks for versions in wrong directory
Expected behaviour
OC display versions of files in web interface
Actual behaviour
No versions of files can be found, but are actually created under [data folder][user]\files-versions\file.txt.v123456 OC seems to look in folder /s/ in /file-versions/ which is not present (see OC error message below)
Steps to reproduce
- Create / upload file
- Change & Save file
- Sync
Server configuration
Operating system: Win 2008 R2 Web server: IIS 7.5 Database: mySQL 5.6.10 PHP version: 3.5.7 ownCloud version: 5.0.8
Client configuration
Browser: Firefox Operating system: Win8 / Win7
Logs
Web server error log
- none -
ownCloud log (data/owncloud.log)
filesize(): stat failed for D:\Daten\ownCloud/user/files-versions/s/choices-klein-gross.doc.v1373754097 at C:\inetpub\wwwroot\owncloud\lib\files\storage\mappedlocal.php#95
I am aware of the the known issue with versions (https://forum.owncloud.org/viewtopic.php?f=23&t=10224), but this seems to be a different problem or just a special flavour when running Win2k8.
@schiesbn
This is a windows related issue - I'm sorry to say that but files_versions is untested on Windows at the moment.
OK - so best way would be to deactivate the versions app? Is there a roadmap when versions will be supported in Win environment?
OK - so best way would be to deactivate the versions app?
yes
Is there a roadmap when versions will be supported in Win environment?
not really - speaking as community member: I don't care about Windows support as I run my ownCloud on linux. In case you have some spare time: feel free to dive into the code and look for the issue.
Windows support was mainly added by the ownCloud Inc on customer request and did not cover files_versions.
@karlitschek Should we disable files_versions on windows in general? Same for trashbin afaik
Trashbin seems to be working at the moment, but in general IMO all apps that are not tested for an enviroment should be disabled for "stable" builds.
@DeepDiver1975 even better would be to fix it ;-) @schiesbn Can you have a look?
even better would be to fix it ;-)
for sure - but we cannot guarantee right away that all apps are working on windows.
As already said, this seems to be a windows-only issue. I can't reproduce it on Linux.
Would be great if you, @TheDK, could help to debug it. The interesting lines in the code are here https://github.com/owncloud/core/blob/stable5/apps/files_versions/lib/versions.php#L248 (248 and 249). It would be interesting to know which "versionsName" and "escapedVersionsName" are generated. Can you find this out and provide the information here?
You could generate a output with following code after line 248 and than check your IIS error log after you tried to access the versions:
error_log("versions Name: $versionsName");
error_log("escaped: $escapedVersionName");
I can help debug. I'm new to debugging but would like to see this app working. Thanks
@maestro7879 Great that you can help to debug the issue. The first think would be to try if the issue is still valid in ownCloud 5.0.10 since 5.0.8 we did some windows related fixes. Can you verify it? Thanks!
Possible to check on 5.0.9 ? That's my current version, trying to avoid the other issues I'm reading about in 5.0.10 until they are worked out.
On Tue, Aug 13, 2013 at 1:03 PM, Björn Schießle [email protected]:
@maestro7879 https://github.com/maestro7879 Great that you can help to debug the issue. The first think would be to try if the issue is still valid in ownCloud 5.0.10 since 5.0.8 we did some windows related fixes. Can you verify it? Thanks!
— Reply to this email directly or view it on GitHubhttps://github.com/owncloud/core/issues/4079#issuecomment-22580472 .
@maestro7879 yes, you can also check with 5.0.9
@maestro7879 If the error still exists than please edit apps/files_versions/lib/versions.php add add after line 249 following code:
error_log("filename: $filename");
error_log("versions Name: $versionsName");
error_log("escaped: $escapedVersionName");
and check the output in your error log.
Making that changed didn't throw any major errors in the logs. It did however create conflict files each time I made a change to the file.
On Tue, Aug 13, 2013 at 1:35 PM, Björn Schießle [email protected]:
@maestro7879 https://github.com/maestro7879 If the error still exists than please edit apps/files_versions/lib/versions.php add add after line 249 following code:
error_log("versions Name: $versionsName"); error_log("escaped: $escapedVersionName");
and check the output in your error log.
— Reply to this email directly or view it on GitHubhttps://github.com/owncloud/core/issues/4079#issuecomment-22582874 .
Making that changed didn't throw any major errors in the logs. It did however create conflict files each time I made a change to the file.
This changes should output the versions name, the escaped name and the original filename every time you open the version drop-down.
Do you modify the files with the sync client? The conflict files are not related to the versioning app. Please test with the web interface only to avoid additional and independent sources of error.
I ended up copying in the versions.php file from the OC 5.0.10 install and it's working now. I have no idea what the actual problem was though. Tested using the client, webpage, etc. and everything works.
On Tue, Aug 13, 2013 at 2:10 PM, Björn Schießle [email protected]:
Making that changed didn't throw any major errors in the logs. It did however create conflict files each time I made a change to the file.
This changes should output the versions name, the escaped name and the original filename every time you open the version drop-down.
Do you modify the files with the sync client? The conflict files are not related to the versioning app. Please test with the web interface only to avoid additional and independent sources of error.
— Reply to this email directly or view it on GitHubhttps://github.com/owncloud/core/issues/4079#issuecomment-22585428 .
Great to hear that it works with the version.php from oc 5.0.10. Will close the issue now. If the issue appear again feel free to re-open it.
Sorry, reopen. It only works for previous files. I deleted all files and started new and no versioning exists. I also input the suggested lines into config.php but I don't see anything in owncloud.log that shows any errors. I tested using only the web interface also and the same issue persists.
On Tue, Aug 13, 2013 at 2:25 PM, Björn Schießle [email protected]:
Great to hear that it works with the version.php from oc 5.0.10. Will close the issue now. If the issue appear again feel free to re-open it.
— Reply to this email directly or view it on GitHubhttps://github.com/owncloud/core/issues/4079#issuecomment-22586445 .
Correction - versions.php was edited. - Is the below correct ?
public static function getVersions($uid, $filename, $count = 0 ) { if( \OCP\Config::getSystemValue('files_versions', Storage::DEFAULTENABLED)=='true' ) { $versions_fileview = new \OC\Files\View('/' . $uid . '/files_versions'); $versionsName = $versions_fileview->getLocalFile($filename).'.v'; $escapedVersionName = preg_replace('/(|?|[)/', '[$1]', $versionsName); $versions = array(); error_log("filename: $filename"); error_log("versions Name: $versionsName"); error_log("escaped: $escapedVersionName"); // fetch for old versions $matches = glob($escapedVersionName.'');
if ( !$matches ) {
return $versions;
}
On Tue, Aug 13, 2013 at 4:14 PM, Dan Crouthamel [email protected]:
Sorry, reopen. It only works for previous files. I deleted all files and started new and no versioning exists. I also input the suggested lines into config.php but I don't see anything in owncloud.log that shows any errors. I tested using only the web interface also and the same issue persists.
On Tue, Aug 13, 2013 at 2:25 PM, Björn Schießle [email protected]:
Great to hear that it works with the version.php from oc 5.0.10. Will close the issue now. If the issue appear again feel free to re-open it.
— Reply to this email directly or view it on GitHubhttps://github.com/owncloud/core/issues/4079#issuecomment-22586445 .