We have moved to Github. Please open tickets there.

Opened 17 months ago

Closed 17 months ago

Last modified 16 months ago

#4254 closed Defect (fixed)

Default Widgets dublicated

Reported by: sergiy.kamolov Owned by:
Priority: normal Milestone: Elgg 1.8.3
Component: Core Version: 1.8.2
Severity: major Keywords: widgets,admin
Cc: brett@… Difficulty:

Description

  1. Login as admin
  2. Open Admin panel > Appearance : Default Widgets
  3. Click on Dashboard tab and add a few widgets
  4. Try to create a new user from admin panel
  5. Login as a new user

Actual result: When I try to move some widget to another place, and refresh the page - another widget appear on old place. So for every widget registered two entities with the same position, so on placed under other.

Also I try to investigate this behavior and spend some time for debugging. I found that there are two event registered for creating default widgets, and both of them try to create widgets on profile page and dashboard page:

[501] => (string) elgg_create_default_widgets
[502] => (string) elgg_create_default_widgets

May be some issue in /engine/lib/widgets.php within line 350 and 357. For now we just check "entity_subtype" to recognize what set of widgets should be copied for users, but we never check "widget_context" and as result system twice cloned the same widgets.

Change History (3)

comment:1 Changed 17 months ago by cash

  • Milestone changed from Needs Review to Elgg 1.8.3
  • Severity changed from critical to major
  • Version changed from 1.8.1 to 1.8.2

Thanks for the report and your effort debugging this. Registering the callback twice is the issue. We'll get this fixed.

comment:2 Changed 17 months ago by cash

  • Resolution set to fixed
  • Status changed from new to closed

Fixes #4254 not registering the default widgets callback more than once per event

Changeset: 050d445fef73bf91968841752d9e1bdb652485f6

comment:3 Changed 16 months ago by cash

Fixes #4254 not registering the default widgets callback more than once per event

Changeset: 050d445fef73bf91968841752d9e1bdb652485f6

Note: See TracTickets for help on using tickets.