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
CBOX-OL stores item types as post types (cboxol_member_type and cboxol_group_type). At runtime, we register them as BP group/member types, using bp_register_member_type() and bp_register_group_type(). This generally worked as long as the taxonomy was totally invisible - used only for storage - which was the case until BP 7.0. Since 7.0, BuddyPress provides an interface for creating and managing these tags via edit-tags.php. But this introduces lots of problems. A few considerations:
Deleting a CBOX item type doesn't delete the corresponding WP term
Deleting a WP item type term doesn't delete the corresponding CBOX item type
When you edit the BP term's slug, it's not reflected in the CBOX system, meaning that certain things break (like group- and member-type-specific directories). Since Compatibility with BP 7.0.0 member- and group-type systems #332 it's not possible to edit these terms in the wp-admin interface, but there are ways around this restriction, such as wp-cli.
So in general there's a lack of proper synchronization between the two sets of data. In the short term, we are mitigating this problem by preventing certain kinds of editing. But in the long term, we should instead improve the sync mechanisms. Among other things, this will open the door to allowing admins to change the slugs of their group/member types.
The key here will be to designate the WP taxonomy term as the source of truth for 'slug'. Then, in CBOX-OL, we will use this value when building URLs, etc. It will also likely mean that we can no longer use the slug as the unique and immutable identifier of item types in CBOX-OL. We'll probably introduce a new property such as id, which will be populated at creation by slug, but will then be independent of slug; id will be stored in post_name and will be unchangeable, while slug will be pulled from the corresponding WP term.
Once we've uncoupled slug and id and ensured proper syncing where necessary, we can re-allow edit-tags.php editing. We can also introduce an editable slug field in on the CBOX item-type editing interface.
The text was updated successfully, but these errors were encountered:
Previously: #332
CBOX-OL stores item types as post types (
cboxol_member_type
andcboxol_group_type
). At runtime, we register them as BP group/member types, usingbp_register_member_type()
andbp_register_group_type()
. This generally worked as long as the taxonomy was totally invisible - used only for storage - which was the case until BP 7.0. Since 7.0, BuddyPress provides an interface for creating and managing these tags via edit-tags.php. But this introduces lots of problems. A few considerations:So in general there's a lack of proper synchronization between the two sets of data. In the short term, we are mitigating this problem by preventing certain kinds of editing. But in the long term, we should instead improve the sync mechanisms. Among other things, this will open the door to allowing admins to change the slugs of their group/member types.
The key here will be to designate the WP taxonomy term as the source of truth for 'slug'. Then, in CBOX-OL, we will use this value when building URLs, etc. It will also likely mean that we can no longer use the
slug
as the unique and immutable identifier of item types in CBOX-OL. We'll probably introduce a new property such asid
, which will be populated at creation byslug
, but will then be independent ofslug
;id
will be stored inpost_name
and will be unchangeable, whileslug
will be pulled from the corresponding WP term.Once we've uncoupled
slug
andid
and ensured proper syncing where necessary, we can re-allow edit-tags.php editing. We can also introduce an editableslug
field in on the CBOX item-type editing interface.The text was updated successfully, but these errors were encountered: