Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rich Text Editing No Auto Save #1361

Open
tunloop opened this issue Aug 25, 2024 · 5 comments
Open

Rich Text Editing No Auto Save #1361

tunloop opened this issue Aug 25, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@tunloop
Copy link

tunloop commented Aug 25, 2024

Steps to reproduce

  1. Enable notes rich text editing
  2. Type something
  3. Observe no auto save like traditional edit mode

Expected behaviour

Like in edit mode, the rich text edit mode should save a second or two after inactivity.

Actual behaviour

Rich Text editor mode has no auto save feature and requires manually saving each time

Logs

Log entry every time the edit tries to save:
{
  "reqId": "1bwjjYeH9WwzGQNiCVcl",
  "level": 3,
  "time": "2024-08-24T23:58:35+00:00",
  "remoteAddr": "192.168.0.2",
  "user": "admin1",
  "app": "text",
  "method": "PUT",
  "url": "/apps/text/session/12914/create",
  "message": "No permission to access this file",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0",
  "version": "29.0.5.1",
  "exception": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/ApiService.php",
        "line": 92,
        "function": "getFileById",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Controller/SessionController.php",
        "line": 62,
        "function": "create",
        "class": "OCA\\Text\\Service\\ApiService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 232,
        "function": "create",
        "class": "OCA\\Text\\Controller\\SessionController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 138,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 338,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1053,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 49,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/apps/text/lib/Service/DocumentService.php",
    "Line": 514,
    "message": "No permission to access this file",
    "exception": [],
    "CustomMessage": "No permission to access this file"
  },
  "id": "66cad25acd457"
}
root@cloud:~$ ls -l /var/www/nextcloud/apps/text/lib/Service/DocumentService.php 
-rw-r--r-- 1 www-data www-data 22096 Aug 20 17:56 /var/www/nextcloud/apps/text/lib/Service/DocumentService.php
root@cloud:~$ ls -ld /var/www/nextcloud/apps/text/lib/Service/                    
drwxr-xr-x 2 www-data www-data 4096 Aug 22 16:15 /var/www/nextcloud/apps/text/lib/Service/
root@cloud:~$ ls -ld /var/www/nextcloud/apps/text/lib         
drwxr-xr-x 16 www-data www-data 4096 Aug 22 16:15 /var/www/nextcloud/apps/text/lib
root@cloud:~$ ls -ld /var/www/nextcloud/apps/text    
drwxr-xr-x 9 www-data www-data 4096 Aug 22 16:15 /var/www/nextcloud/apps/text
root@cloud:~$ ls -ld /var/www/nextcloud/apps     
drwxr-xr-x 65 www-data www-data 4096 Aug 23 18:30 /var/www/nextcloud/apps
root@cloud:~$ ls -ld /var/www/nextcloud     
drwxr-xr-x 14 www-data www-data 4096 Aug 22 16:15 /var/www/nextcloud
4 S root       80081       1  0  80   0 - 145893 do_epo Aug16 ?       00:00:35   php-fpm: master process (/etc/php/8.3/fpm/php-fpm.conf)
5 S www-data  147329   80081  0  80   0 - 170681 skb_wa Aug22 ?       00:02:33     php-fpm: pool www
5 S www-data  158782   80081  0  80   0 - 171344 skb_wa Aug23 ?       00:01:32     php-fpm: pool www
5 S www-data  171566   80081  0  80   0 - 171481 skb_wa 23:37 ?       00:00:04     php-fpm: pool www
5 S root      147295       1  0  80   0 -  5664 sigsus Aug22 ?        00:00:00   nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
5 S www-data  147296  147295  0  80   0 -  6359 do_epo Aug22 ?        00:00:22     nginx: worker process
5 S www-data  147297  147295  0  80   0 -  6266 do_epo Aug22 ?        00:00:21     nginx: worker process
5 S www-data  147298  147295  0  80   0 -  6229 do_epo Aug22 ?        00:00:21     nginx: worker process
5 S www-data  147299  147295  0  80   0 -  6164 do_epo Aug22 ?        00:00:21     nginx: worker process

Log says no permission to that php file. There is access to that file. Globally. And all directories above it.

Server

Please complete the following information.

  • Notes app version: 4.10.1
  • Nextcloud version: 29.0.5
  • OS: Debian 12 AMD64
  • Web server: nginx 1.27.1
  • PHP version: php8.3
  • Database: mariadb 10.11.6

Nextcloud configuration:

``` { "system": { "proxy": "apt.example.com:3142", "proxyexclude": [ "cloud.example.com", "sso.example.com" ], "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "overwritehost": "cloud.example.com", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.example.com:443" ], "connectivity_check_domains": [ "www.nextcloud.com" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "29.0.5.1", "overwrite.cli.url": "https:\/\/cloud.example.com\/", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": false, "maintenance_window_start": 1, "theme": "", "auth.webauthn.enabled": false, "loglevel": 2, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "dbindex": 0, "timeout": 1.5 }, "memcache.locking": "\\OC\\Memcache\\Redis", "default_phone_region": "US", "allow_local_remote_servers": true, "mail_smtpmode": "sendmail", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "app_install_overwrite": [ "breezedark" ], "app.mail.verify-tls-peer": false, "memories.exiftool_no_local": true, "memories.vod.path": "\/var\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64" } } ```

Client

Please complete the following information.

  • Browser (incl. version): Firefox 129
  • OS: Debian 12 AMD64
@tunloop tunloop added the bug Something isn't working label Aug 25, 2024
@joshtrichards
Copy link
Member

joshtrichards commented Sep 10, 2024

Log says no permission to that php file.

It's referring to the file being edited. The error comes from the rich text app:

https://github.com/nextcloud/text/blob/7a5e7c5c773a6fc7e8780f5d9ef3d46036886e29/lib/Service/ApiService.php#L69

Do you have similar behavior when editing a file outside of the Notes app? (E.g. directly creating or opening an md or txt file from Files)

@joshtrichards joshtrichards transferred this issue from nextcloud/notes Sep 10, 2024
@joshtrichards
Copy link
Member

Also see: nextcloud/text#3899

@tunloop
Copy link
Author

tunloop commented Sep 10, 2024

Log says no permission to that php file.

It's referring to the file being edited. The error comes from the rich text app:

https://github.com/nextcloud/text/blob/7a5e7c5c773a6fc7e8780f5d9ef3d46036886e29/lib/Service/ApiService.php#L69

Do you have similar behavior when editing a file outside of the Notes app? (E.g. directly creating or opening an md or txt file from Files)

I actually didn't know that editing in general has an autosave feature? Because, yeah, its the same error when editing files in the Documents app.

{
  "reqId": "HIQxW84rQlufb0qDHoAR",
  "level": 3,
  "time": "2024-09-10T17:48:55+00:00",
  "remoteAddr": "192.168.0.2",
  "user": "admin1",
  "app": "text",
  "method": "PUT",
  "url": "/apps/text/session/12914/create",
  "message": "No permission to access this file",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0",
  "version": "29.0.6.1",
  "exception": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/text/lib/Service/ApiService.php",
        "line": 92,
        "function": "getFileById",
        "class": "OCA\\Text\\Service\\DocumentService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/text/lib/Controller/SessionController.php",
        "line": 62,
        "function": "create",
        "class": "OCA\\Text\\Service\\ApiService",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 232,
        "function": "create",
        "class": "OCA\\Text\\Controller\\SessionController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 138,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 184,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 331,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1058,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 49,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/apps/text/lib/Service/DocumentService.php",
    "Line": 514,
    "message": "No permission to access this file",
    "exception": [],
    "CustomMessage": "No permission to access this file"
  },
  "id": "66e086a726f3c"
}

But why would it not have access to the file Im trying to edit? Manually saving works. And I checked, the files are writable by the PHP user and group.

@mejo-
Copy link
Member

mejo- commented Sep 11, 2024

@tunloop if I understand your report correctly, this is about the Notes app, right? Let me transfer the issue there then.

@mejo- mejo- transferred this issue from nextcloud/text Sep 11, 2024
@tunloop
Copy link
Author

tunloop commented Sep 21, 2024

@tunloop if I understand your report correctly, this is about the Notes app, right? Let me transfer the issue there then.

I actually don't know. This error happens in the documents section when editing text files in rich text mode, so this error would impact the rich text app in general and not only the notes app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants