Bug #21751
openGroup + Site cloning issue
Added by Colin McDonald about 2 months ago. Updated 2 days ago.
0%
Description
I don't think this is Reclaim related, because I think I've reproduced it in both environments, but here is a screen recording of me trying to create a Group + Site in the Reclaim environment. If I choose cloning for the group step, it skips over the Site and other steps and goes right to the congratulations screen.
Files
group and site cloning broken.mov (7.52 MB) group and site cloning broken.mov | Colin McDonald, 2025-01-13 01:20 PM |
Updated by Colin McDonald about 2 months ago
Sorry, here is the screen recording attachment.
Updated by Boone Gorges about 2 months ago
Not sure this is a bug. See eg https://redmine.gc.cuny.edu/issues/13198#note-16. Subsequent group-creation steps are explicitly removed when cloning a group. See https://github.com/cuny-academic-commons/cac/blob/f0593de527a8a449e271448364a4615894bcecbd/wp-content/plugins/bp-custom.php#L1013
Updated by Colin McDonald about 2 months ago
But what I'm trying to do is create a Group + Site. At first in the video there is a Step 4 for adding a site, but then the site aspect seems to disappear altogether, and I think I've only created a group by the end and no site at all.
Updated by Boone Gorges about 2 months ago
- Assignee changed from Boone Gorges to Jeremy Felt
- Target version changed from Migration to Reclaim to 2.6.0
The tabs you see on the first step aren't meaningful. The system doesn't know that you're cloning until after you've submitted the first step. We could explore making these tabs dynamic in the future.
The fact that a new site was not created does seem like a bug. Jeremy, I'm going to assign this to you for a closer look. This can be part of a release after the migration.
Updated by Colin McDonald 28 days ago
I was looking at #21895 and confirmed that this is still happening on the current Reclaim environment, if you could add to your list Jeremy when possible.
Updated by Jeremy Felt 9 days ago
I'm still homing in on a solution, but I do see two adjacent bugs here, one of which is the bug for this ticket, the other may still be waiting to be found. :)
1. git bisect
led to this commit as the technical cause for the current issue. Before this landed, the site details screen would appear. After, it does not. If I comment these changes out, the process works, though I wouldn't be surprised if it impacts the standard group cloning flow. https://github.com/cuny-academic-commons/cac/commit/991d2a6910c6098db5c1f6d42d45eb492bcf9c29
2. The code that clears the bp_completed_create_steps
and bp_new_group_id
cookies on confirmation does not fire properly, so if you go to create another group, things may be confusing. This appears when the group creation flow was redesigned. https://github.com/cuny-academic-commons/cac/commit/acbfd03d35bdbc3e8d918042385b35205f8a18a0
I think these are separate bugs, but that both have the same general cause: the expected order of operations is different for group cloning and group + site cloning, and something related to that is off just a bit.
I'm going to keep at it, but if Ray or Boone looks at either of those commits and has an "oh, duh!" moment, feel free to shout. :)
Updated by Boone Gorges 8 days ago
Thanks for digging, Jeremy. Regarding https://github.com/cuny-academic-commons/cac/commit/991d2a6910c6098db5c1f6d42d45eb492bcf9c29, I wonder if somehow there's some sort of indexing thing happening. I see that I added 'group-cover-image' to the list of completed_create_steps. I wonder if BP is then trying to navigate to the next step after that one in the list of 'group_creation_steps', which ends up skipping you to the end of the list. This is just a hunch.
2. The code that clears the bp_completed_create_steps and bp_new_group_id cookies on confirmation does not fire properly, so if you go to create another group, things may be confusing. This appears when the group creation flow was redesigned. https://github.com/cuny-academic-commons/cac/commit/acbfd03d35bdbc3e8d918042385b35205f8a18a0
I wonder if they are in fact related to each other. See https://github.com/cuny-academic-commons/cac/blob/20b1e014a153aa193b29b14398e269344437bc74/wp-content/plugins/buddypress/bp-groups/actions/create.php#L179 The fact that we're mucking around manually with these 'steps' globals might mean that this check is not being passed properly. Sorry for the mess :-D
Updated by Jeremy Felt 2 days ago
The fact that we're mucking around manually with these 'steps' globals might mean that this check is not being passed properly
I think you're right about this. I've spent some time stepping through the code with xdebug, but I think I'm still in an unknown state. I'll pass this over to Boone so that it doesn't stay a blocker - I'm guessing you'll spot the issue much quicker. I'll keep my eyes open if you need testing/other support though! :)