files_texteditor icon indicating copy to clipboard operation
files_texteditor copied to clipboard

Text editor save functionality broken

Open prismopensource opened this issue 10 years ago • 5 comments

Steps to reproduce

As described in this forum topic: https://forum.owncloud.org/viewtopic.php?f=31&t=30052&p=95075#p95075

  1. Download OC 8.1.1
  2. Do the one click sqlite install.
  3. Create a new empty text file, for example New text file.txt
  4. Open this New text file.txt
  5. Add some text with the Text Editor.
  6. 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>

prismopensource avatar Aug 27 '15 10:08 prismopensource

Bug is still present in 8.2.1 .htaccess file with workaround posted above was overwritten.

prismopensource avatar Dec 11 '15 18:12 prismopensource

@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 avatar Dec 30 '15 11:12 tomneedham

@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.

prismopensource avatar Jan 02 '16 12:01 prismopensource

Bug is still present in 8.2.2 unfortunately.

prismopensource avatar Jan 15 '16 08:01 prismopensource

9.1.0 still needs this addition to the .htaccess file to make it work.

prismopensource avatar Jul 21 '16 13:07 prismopensource