Text editor save functionality broken
Steps to reproduce
As described in this forum topic: https://forum.owncloud.org/viewtopic.php?f=31&t=30052&p=95075#p95075
- Download OC 8.1.1
- Do the one click sqlite install.
- Create a new empty text file, for example New text file.txt
- Open this New text file.txt
- Add some text with the Text Editor.
- Click the Save button
Expected behaviour
After hitting the save button you'd expect the * after the filename to go away and have the file saved.
Actual behaviour
I can click the save button, and it temporarily changes to a saving button but nothing gets saved; the * always stays. If I click the home button and open the text file again, changes aren't present.
The Owncloud log doesn't log anything about this, JS console in Chrome gave me:
PUT https://domainname.com/index.php/apps/files_texteditor/ajax/savefile 403 (Forbidden) send @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:6x.extend.ajax @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:6doFileSave @ editor.js?v=2ff3429c1747c221bc6b99b06b6ac90e:161x.event.dispatch @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:5v.handle @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:5
Uncaught SyntaxError: Unexpected token < (anonymous function) @ editor.js?v=2ff3429c1747c221bc6b99b06b6ac90e:184c @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:4p.fireWith @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:4k @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:6r @ jquery.min.js?v=2ff3429c1747c221bc6b99b06b6ac90e:6 <
Server configuration
Operating system:
Debian 6
Web server:
Apache 2.4
Database:
MySQL 5.5 or Sqlite
PHP version:
5.5.28
ownCloud version:
ownCloud 8.1.1 (stable)
Updated from an older ownCloud or fresh install:
Updated from 8.0.4 or fresh install
Client configuration
Browser:
Chrome 44 or Safari 8 both on Mac OS 10.10.5
Steps to fix:
Downgrade to either 8.0.7rc1 or 8.0.6 or add the following lines to your .htaccess file:
<Limit GET POST>
order allow,deny
allow from all
</Limit>
<Limit PUT DELETE>
order allow,deny
allow from all
</Limit>
Bug is still present in 8.2.1 .htaccess file with workaround posted above was overwritten.
@quassum So there is nothing in the owncloud.log and you are still seeing the JS console errors? From the snippet you posted it does seem like this is a request being blocked by your web server and not actually reaching ownCloud.
The problem was in php <5.6 and was fixed in 8.1.3 and should be in 8.2 with https://github.com/owncloud/core/pull/18691
Please could you retest with 8.2.1 and check what errors you are receiving and see if they are the same as the original problem.
@tomneedham Still the same with 8.2.1 with PHP upgraded to 5.6.16. Nothing in owncloud.log, only the JSON parse errors. Please let me know if I need to do more testing.
Bug is still present in 8.2.2 unfortunately.
9.1.0 still needs this addition to the .htaccess file to make it work.