You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To reproduce: add a widget to your dashboard, save, edit page again and add that same widget. Some widgets show some bad behavior when more than one exists on a page. The twitter widget is an example of that. The description above says the status widget is another.
The problem is that the multiple variable is not being used to prevent multiple widgets from being added to a page when a user edits a page more than once. views/default/canvas/layouts/widgets.php (or a function in the engine) would need to check what current widgets are on the page and then remove those from the widget list that have the multiple variable set to false.
Also, I wouldn't describe this as trivial for 2 reasons:
This can create some very strange behavior with widgets and there is not anything that plugin developers can do about it.
It points out there are some incomplete portions of the widget handling code. Even if the multiple flag is set in the widget handler array, it isn't used for anything as far as I can tell. If a plugin sets the multiple flag to true, a user still can't add that widget to a profile page more than once in a edit page session. (Tested with 1.2)
Related bug in views/default/canvas/layouts/widgets.php:
Original ticket http://trac.elgg.org/ticket/590 on 38903919-11-18 by trac user SGr33n, assigned to unknown.
Elgg version: 1.1
Hi,
Try to insert two times the status widget on a profile page (or the dashboard), then try to set a new status. The Status will work strange after this.
It would be nice to prevent the user install 2 times the same plugin on the same page (profile or dashboard).
Thanks :)
The text was updated successfully, but these errors were encountered: