Sort or order Node add page by bundle label rather than the current seemingly-random order

Created on 20 October 2020, over 3 years ago
Updated 12 September 2023, 10 months ago

The page on the node creation route (group/{group}/node/create) lists the bundles in a seemingly-random order. It would be nice if these were displayed in alpha order by bundle label.

✨ Feature request
Status

Needs work

Version

3.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States azinck

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • This simple patch still applies and still works as described.

  • Status changed to Needs review 10 months ago
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    9,627 pass
  • Open in Jenkins β†’ Open on Drupal.org β†’
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update 10 months ago
    9,627 pass
  • This still happens in Group 2.1.x at least -- I haven't tested on 3.1.x but am including a patch for it just in case.

    As an aside, the "Add group content" page now has all content showing as "Group node (Content Type)". This is really redundant for groups that can only add node content and I plan to write a custom patch for my client project to ensure it only says "Content Type." I may open a separate ticket to request that the "Add group content" list only bundles alphabetically by label (referencing this issue) and separate them into separate headers, e.g.:

    Group Node

    > Alert
    > Basic page
    > Book
    > Event

    Group BespokeEntityType

    > Adjunct
    > IPA
    > Stout

  • Here's a custom patch to edit "Group node (Content type)" to just "Content type" on the "Add new content" and "Add existing content" pages. It applies to both 2.1.x and 3.1.x.

    This isn't intended to be committed to the module and should only be used if group nodes are the only content that can be added to groups for your project.

  • updated patch to remove "Group node" label.

  • Status changed to Needs work 10 months ago
  • πŸ‡§πŸ‡ͺBelgium kristiaanvandeneynde Antwerp, Belgium

    I'll note that core's node/add page sorts by content type machine name, but label probably makes more sense for the end user.

    Agreed, but I also like to stay as close to core as possible behavior-wise. So While I do like the sections that @caesius suggested, I'm not sure I want to change the order to differ from core. That said, the patch here is not the right way forward as we need that label to clearly indicate we're dealing with something coming from Group.

    Perhaps we can adjust the add page instead.

Production build 0.69.0 2024