Server: Dashboard app: Disabling the weather and status widgets is not consistent

Created on 28 Aug 2020  路  12Comments  路  Source: nextcloud/server

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Update to NC 20 beta 2
  2. see the new dashboard app
  3. disable the weather and status widgets
  4. the weather and status widgets are now invisible
  5. force a reload of the side
  6. the weather and status widgets are now visible again

Expected behaviour

They should still be unvisible

Actual behaviour

they are visible

Server configuration

Nextcloud version: (see Nextcloud admin page)
NC 20 beta 2
Updated from an older Nextcloud/ownCloud or fresh install:
updated from NC 19.0.1
Where did you install Nextcloud from:
NcVM

0. Needs triage bug

Most helpful comment

@szaimen It is not meant to be this way :grin:. I can't reproduce this problem. Could you run this SQL query ?

select configvalue from oc_preferences where appid="dashboard" and configkey="statuses"

After having disabled the statuses, you are supposed to get {"weather":false,"status":false}.

Also, is there any error in the browser error log or the server logs when you toggle a status?

All 12 comments

@nextcloud/designers I wonder if it is
meant to be this way?

cc @juliushaertl @eneiluj

@szaimen It is not meant to be this way :grin:. I can't reproduce this problem. Could you run this SQL query ?

select configvalue from oc_preferences where appid="dashboard" and configkey="statuses"

After having disabled the statuses, you are supposed to get {"weather":false,"status":false}.

Also, is there any error in the browser error log or the server logs when you toggle a status?

This is the output when running the command:
image

This is what the following command returns:
image

Those are the console logs:
image

In the nextcloud logs, I get nothing related.

@eneiluj Could it be a problem, that I am running a Postgresql database?

Could it be a problem, that I am running a Postgresql database?

@szaimen I don't think so as other values are successfully written to your oc_preferences table.

  1. Could you check if the request to "/apps/dashboard/statuses" is failing or not in the network tab of developer tools? The request JSON parameters is supposed to be
statuses: "{\"weather\":true,\"status\":false}"
  1. Is the widget layout saved correctly? If not, then the problem is larger...

@juliushaertl Any clue of what is happening there?

Thanks for your respond!

for 1.: This is what I get in the network tab when modifying the weather and status widgets:
image

for 2.: The layout is saved correctly until I reload the site. Then it just shows those widgets again, also if I had disabled them before. (probably because the statuses value(s) isn't saved correctly into the database)

@szaimen Which browser are you using? Could you try with another one?

Widget activation, widget layout and statuses activation are all supposed to be saved and restored on page load. For the moment I have no idea what happens to you but it seems nothing is saved.

I've tested this on Brave, which is based on Chromium 85.
But the same happens on Firefox 80, too.
image

but it seems nothing is saved.

This is not true. The layout of the app-widgets like recent files and recent statuses is saved and restored correctly. (But this is most likely stored in a layout respond? and not in the status respond?)
Only the weather and status widgets have this problem.

I thought you said the widgets layout was not saved.

Anyway I found the problem. I'll fix that soon. Thanks for your perseverance :+1:

@szaimen Ok fixed. Could you try fix/save-statuses branch and confirm it now works fine?

I thought you said the widgets layout was not saved.

Sry, maybe I wasn't clear enough.

Anyway I found the problem. I'll fix that soon. Thanks for your perseverance 馃憤

Great!

@szaimen Ok fixed. Could you try fix/save-statuses branch and confirm it now works fine?

@eneiluj Yes, I've tried the fix by simply copying the content to the correct file and it fixes the issue. Thank you very much!

I guess this can be closed since the fix was merged

Was this page helpful?
0 / 5 - 0 ratings