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

MODX3 - Default dashboard not respecting removal of widgets #14753

Open
muzzwood opened this issue Sep 24, 2019 · 6 comments
Open

MODX3 - Default dashboard not respecting removal of widgets #14753

muzzwood opened this issue Sep 24, 2019 · 6 comments
Labels
bug The issue in the code or project, which should be addressed.
Milestone

Comments

@muzzwood
Copy link
Contributor

Bug report

Summary

Fresh install of latest MODX 3 dev. Removed some widgets from the default dashboard then saved. Viewed dashboard and all widgets are still there.
Went back to the edit dashboard screen and widgets are still removed.
So it's saving the changes, it must just be a problem with loading the dashboard.

It appears this only happens with the default dashboard. I created a new dashboard and assigned it to the admin group and it displayed correctly.

Step to reproduce

Remove widgets from default dashboard then view the dashboard.

Observed behavior

All Widgets showed on dashboard screen even though some had been removed.

Expected behavior

Dashboard should not show widgets that have been removed.

Environment

MODX 3.0dev

@Mark-H
Copy link
Collaborator

Mark-H commented Sep 24, 2019

Isn't editing the default dashboard a no-no anyway because that'll be overwritten on upgrade? Maybe the dashboard should be properly locked now that it's much easier to customise.

@muzzwood
Copy link
Contributor Author

Yeah that's a good point. I suppose on the dashboard list page, the "Update dashboard" option should be disabled on the default one.
It would be good to somehow make it more clear from first glance that the default needs to be duplicated too.
Hmm.. is there a technical (or other) reason the default dashboard is overwritten on upgrade?

@sottwell
Copy link
Contributor

I've never had my additions or removals of default widgets changed on upgrade.

@muzzwood
Copy link
Contributor Author

My understanding is the default dashboard will have the default widgets re-added if they've been removed after a MODX upgrade. Other dashboards are left as is.

@sottwell
Copy link
Contributor

Well, in any case a better practice would be to create dashboards specific to groups that require modified dashboards.

@BobRay
Copy link
Contributor

BobRay commented Jun 3, 2020

I agree with Susan (Upgrade MODX gets added to the default dashboard and has always stayed there through all upgrades). I can confirm that removing widgets from the default dashboard does not remove their records from the dashboard_widget_placement table.

But something else weird seems to be going on with dashboards. The dashboard_widget_placement table now has a 'user' field, though it never has before. AFAIK, individual users don't even have dashboards, much less their own widgets, only user groups do, and there's no way to set a dashboard or a widget for an individual user in the Manager. What, then, is the point of the 'user' field in that table?

Four of the widgets on my fresh MODX3 site appear twice in the dashboard_widget_placement table in the DB, once with a user of 0, and again with a user of 1. Widgets that only appear with a user of 0 don't show up on the dashboard they are attached to.

This broke upgradeMODX in MODX3 because it attaches itself to the default dashboard but doesn't set the user field. With a user of 0 it doesn't appear.

I haven't checked but I think that maybe removing a widget from the default dashboard creates a second record for it with the user field set to 0, without deleting the original record.

@alroniks alroniks added the bug The issue in the code or project, which should be addressed. label Mar 30, 2021
@alroniks alroniks added this to 📥 Backlog in MODX 3.0.0-alpha via automation Mar 30, 2021
@alroniks alroniks added this to the v3.0.0-alpha3 milestone Mar 30, 2021
@rthrash rthrash added this to 📥 Backlog in MODX Revolution Beta 1 Apr 12, 2021
@opengeek opengeek modified the milestones: v3.0.0-alpha3, v3.0.0-beta1 Oct 27, 2021
@opengeek opengeek modified the milestones: v3.0.0-beta1, v3.0.0-beta2 Nov 9, 2021
@opengeek opengeek modified the milestones: v3.0.0-beta2, v3.0.0-rc1 Nov 23, 2021
@opengeek opengeek modified the milestones: v3.0.0-rc1, v3.0.0-rc2 Jan 20, 2022
@opengeek opengeek modified the milestones: v3.0.0-rc2, v3.0.0-pl Feb 3, 2022
@opengeek opengeek modified the milestones: v3.0.0, v3.0.1 Mar 29, 2022
@opengeek opengeek modified the milestones: v3.0.1, v3.0.2 Apr 28, 2022
@opengeek opengeek modified the milestones: v3.0.2, v3.0.3 Nov 16, 2022
@opengeek opengeek modified the milestones: v3.0.3, v3.1.0 Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue in the code or project, which should be addressed.
Projects
MODX 3.0.0-alpha
  
📥 Backlog
Development

No branches or pull requests

6 participants