#7919 closed defect (bug) (fixed)
Nouveau: create_screen_checked parameter for Group Type
Reported by: | wbcomdesigns | Owned by: | djpaul |
---|---|---|---|
Milestone: | 3.2.0 | Priority: | normal |
Severity: | normal | Version: | 3.0.0 |
Component: | Templates | Keywords: | has-patch commit |
Cc: |
Description
create_screen_checked parameter is missing inside template files
buddypress\bp-templates\bp-nouveau\buddypress\groups\single\admin\group-settings.php
It allows to set the default group type.
It's defined inside bp_groups_register_group_type()
Attachments (3)
Change History (11)
#1
@
6 years ago
@wbcomdesigns I've just checked this, registering a group type in bp-custom.php so available across themes.
In legacy it works as expected but also it's working in Nouveau for me, can you check how you registered the group type, ensure create_screen_checked => true,
repo current etc etc, I'm sure you've covered all those though so interesting to find out why working for me and not you.
#2
@
6 years ago
- Keywords has-patch added
@hnla Please check 7919_1.patch
It's about enabling the default selected group type on create group page. You have the option to select group type at create group page, but allows site admin that some group type will show up as selected by default.
Inside Create Group Type plugin, we have the option to keep all group type as preselected, and we are going to extend it with specific group type choice inside backend.
#3
@
6 years ago
The code in both bp-legacy and bp-nouveau is identical:
- bp-legacy: https://buddypress.trac.wordpress.org/browser/tags/3.1.0/src/bp-templates/bp-legacy/buddypress/groups/single/admin/group-settings.php?marks=58,68#L57
- bp-nouveau: https://buddypress.trac.wordpress.org/browser/tags/3.1.0/src/bp-templates/bp-nouveau/buddypress/groups/single/admin/group-settings.php?marks=63,74#L62
So if there is a bug it should occur in bp-legacy as well.
@wbcomdesigns I haven't checked yet, but can you confirm that there is a problem with bp-legacy as well?
#4
@
6 years ago
@r-a-y Inside the legacy, we have
<label for="<?php printf( 'group-type-%s', $type->name ); ?>"><input type="checkbox" name="group-types[]" id="<?php printf( 'group-type-%s', $type->name ); ?>" value="<?php echo esc_attr( $type->name ); ?>" <?php checked( true, ! empty( $type->create_screen_checked ) ); ?> /> <?php echo esc_html( $type->labels['name'] ); ?>
create_screen_checked is not used in nouveau anywhere.
#5
@
6 years ago
- Milestone changed from Awaiting Review to 3.2.0
- Version set to 3.0.0
@wbcomdesigns - I can verify the problem now. Thanks for the nudge!
The issue is that Nouveau shares the group settings options output with the create output. 02.patch
is a little cleaner as it moves the checked logic out of the group settings admin template and into a function.
my suggestion to fix it