cuny-academic-commons / commons-in-a-box

Commons In A Box - A suite of community and collaboration tools for WordPress, designed especially for academic communities
http://commonsinabox.org
72 stars 14 forks source link

Changing group type name doesn't change top-level nav item #290

Closed agmckinney closed 1 year ago

agmckinney commented 6 years ago

When attempting to change a group type name, it takes on the back end (Portfolio to ePortfolio in this case: screen shot 2018-07-27 at 10 56 18 am

But does not take on the front end in either the top level menu or in the front page directories screen shot 2018-07-27 at 10 57 41 am

boonebgorges commented 6 years ago

The issue here is the same as in cuny-academic-commons/openlab-theme#264: navigation menus and front-end widgets are separately saved, and separately controllable by the administrator (see the Customize area).

agmckinney commented 6 years ago

Got it. Thanks, Boone!

beckej13820 commented 4 years ago

Related question... Is there a way to update the URLs of the group pages. For example:

If I did all the work to change the group type Club to now be named Organization, can I change the url from openlab.url/groups/type/club to openlab.url/groups/type/organization

(if this is more of a "support forum" question, I'm happy to move it there, but I have been waiting for a couple weeks to be approved as a member of the official Commons in a Box forums. Are those abandoned? Are the regular admins furloughed because of the crisis?)

boonebgorges commented 4 years ago

There's no place in the interface to change the 'slug' of a group type, because if you change it, it will break all existing permalinks - external links to the site, internal links that are stored in the database rather than generated dynamically, etc. If you want to make the change manually, find the items in your wp_posts table with post_type = 'cboxol_group_type'. You can change the post_name value on those entries.

boonebgorges commented 3 years ago

Keeping this open for the following possible feature request: When changing the name of a default group type, change the name of the corresponding nav menu item.

boonebgorges commented 1 year ago

This is now implemented. Note that it only looks at the items in the 'Main Menu' that is automatically created by CBOX-OL at the time of installation. I'm not touching other nav menu items that users may have created manually.

bree-z commented 1 year ago

Thanks Boone! The group type name change looks good, however when I made this change, the order of the menu was changed.

Original menu order:

MenuOrderPrevious

Then, I changed Courses > Seminars, Clubs > Communities, Projects > Things.

After saving, the menu had changed to the following:

MenuOrderChanged
boonebgorges commented 1 year ago

WP is extremely annoying here, in that you apparently have to pass every property of a nav item when updating that nav item, otherwise the unmentioned properties will be zeroed out. This includes 'position'. I've made the necessary change and it appears that the position overwriting is no longer happening.

bree-z commented 1 year ago

Thanks Boone! This looks good.