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

Editing via nextcloud onlyoffice app doesn't update last modified date of file #312

Closed
despens opened this issue Jul 17, 2020 · 12 comments
Closed

Comments

@despens
Copy link

despens commented Jul 17, 2020

Using nextcloud 19.0.1 with the latest document editor from docker, and block storage configured:

When creating a new document in the nextcloud web interface, the last modified date is set to file creation time. The sync client picks up the empty document file and copies it to the connected clients.

When then editing the new document with the web based document editor, the editing works fine and all changes are stored in the file. However, the last modified date of the file is not changed in nextcloud. The sync client will not pick up any changes and the local file on the clients will remain the empty.

nextcloud error log

[onlyoffice] Error: OCP\Http\Client\LocalServerException: Host violates local access rules at <>

  1. /var/www/html/lib/private/Http/Client/Client.php line 227
    OC\Http\Client\Client->preventLocalAddress("http://onlyoffi ... x", {timeout: 60})
  2. /var/www/html/custom_apps/onlyoffice/lib/documentservice.php line 367
    OC\Http\Client\Client->get("http://onlyoffi ... x", {timeout: 60})
  3. /var/www/html/custom_apps/onlyoffice/controller/callbackcontroller.php line 444
    OCA\Onlyoffice\DocumentService->Request("http://onlyoffi ... x")
  4. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Onlyoffice\Controller\CallbackController->track("eyJ0eXAiOiJKV1Q ... M", ["octvz01shbpt_admin"], "388147545", 2, "http://onlyoffi ... x", null)
  5. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 100
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Onlyoffice\C ... {}, "track")
  6. /var/www/html/lib/private/AppFramework/App.php line 137
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Onlyoffice\C ... {}, "track")
  7. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\Onlyoffice ... r", "track", OC\AppFramework\ ... {}, {_route: "onlyoffice.callback.track"})
  8. <>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "onlyoffice.callback.track"})
  9. /var/www/html/lib/private/Route/Router.php line 297
    call_user_func(OC\AppFramework\ ... {}, {_route: "onlyoffice.callback.track"})
  10. /var/www/html/lib/base.php line 1007
    OC\Route\Router->match("/apps/onlyoffice/track")
  11. /var/www/html/index.php line 37
    OC::handleRequest()

POST /apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhZG1pbiIsImZpbGVJZCI6MjU0OSwiZmlsZVBhdGgiOiJcL0RvY3VtZW50c1wvXHUwMGU0ZGEnd2ViIGV4cGxvcmVyLnhsc3giLCJzaGFyZVRva2VuIjpudWxsLCJhY3Rpb24iOiJ0cmFjayJ9.erL-vzvrs8xF8foaUd2wvkoSv9z_DgeV9NcIxcIOROM
from xxx.xxx.xxx.xxx by admin at 2020-07-17T16:38:41+00:00

[no app in context] Warning: Host onlyoffice was not connected to because it violates local access rules

POST /apps/onlyoffice/track?doc=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySWQiOiJhZG1pbiIsImZpbGVJZCI6MjU0OSwiZmlsZVBhdGgiOiJcL0RvY3VtZW50c1wvXHUwMGU0ZGEnd2ViIGV4cGxvcmVyLnhsc3giLCJzaGFyZVRva2VuIjpudWxsLCJhY3Rpb24iOiJ0cmFjayJ9.erL-vzvrs8xF8foaUd2wvkoSv9z_DgeV9NcIxcIOROM
from xxx.xxx.xxx.xxx by admin at 2020-07-17T16:38:41+00:00

@despens
Copy link
Author

despens commented Jul 18, 2020

BTW, on another nextcloud instance that uses a regular file system backend instead of block storage, but is otherwise configured identically, this problem does not exist.

@pilsnerbeer
Copy link

I have the same issue using Onlyoffice as integrated app in NC 19 snap. I dont use block storage. Not only the "modified" date isn't changed, the Activity app also doesnt report any changes made to the file using web editor. I have had this problem myself since I upgraded to Nextcloud hub and downloaded Onlyoffice from the store.

@HelenBelova17
Copy link
Member

HelenBelova17 commented Jul 20, 2020

Hello @despens,
add this line to config.php:
allow_local_remote_servers' => true,

@pilsnerbeer
Copy link

@HelenBelova17 Is this possible with snap instance?

@HelenBelova17
Copy link
Member

@pilsnerbeer, try to do this.

@despens
Copy link
Author

despens commented Jul 20, 2020

@HelenBelova17

allow_local_remote_servers' => true,

OK this did the trick!

Thank you so much!

@pilsnerbeer
Copy link

@HelenBelova17 Doesn't seem to have any effects on my installation, problems still present.

@HelenBelova17
Copy link
Member

@pilsnerbeer, any errors in Nextcloud log?

@pilsnerbeer
Copy link

@HelenBelova17 nothing unusual.

@LinneyS
Copy link
Member

LinneyS commented Jul 22, 2020

I understand the local address problem in NC19 is solved by 'allow_local_remote_servers' => true

@pilsnerbeer you can create a new issue

@joserick
Copy link

joserick commented Sep 8, 2021

Hi!,

Note: allow_local_remote_servers' => true didn't work for me.

Yesterday a client gave me this problem and I managed to solve it realizing that the "CRON" had not been executed in 3 months, for which I proceeded to execute it manually (php -f cron.php), and after a minute and half, the date of the previously modified document It was updated, to which I considered that the Onlyoffice somehow storage the task of updating dates in this process of "CRON" and not in "AJAX"

To which based on the documentation of Nextcloud -> "Background jobs" I was able to make the CRON run once every minute.

And magically the dates of the files began to be updated between 1 and 2 minutes of waiting

@ph00lt0
Copy link

ph00lt0 commented Sep 8, 2021

Have had this issue also for ages. Decided not to use onlyoffice online editor because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants