Taxonomy terms are not working on user registration form

Created on 28 December 2024, 26 days ago

Problem/Motivation

When you use a taxonomy field on the user registration form, it does not show on the registration form, but it does show on the user edit form.

Steps to reproduce

  • Create a taxonomy list with terms
  • Add the taxonomy field on the user registration form and edit the permissions so anonymous users can use it
  • Log out
  • Go to user registration form => field is not showing
🐛 Bug report
Status

Active

Version

10.4

Component

forms system

Created by

🇧🇪Belgium khoebeke Brakel

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

Comments & Activities

  • Issue created by @khoebeke
  • 🇬🇧United Kingdom catch
  • Hey @khoebeke,

    I have followed all the mentioned steps, and the taxonomy field is visible on the user registration form. I am attaching screenshots for reference. I am using Drupal 10.4.0 and have created a vocabulary named "Genre," which I added to the user registration form.

    Here’s what I did:

    1. Created the "Genre" vocabulary and added terms.
    2. Added a taxonomy reference field to the user entity and configured it to appear on the registration form.
    3. Verified whether the field is enabled under the Manage Fields section.
    4. Cleared all caches after making the changes.

    Could you please confirm if there are any additional steps I might have missed? Also, kindly check if the field is enabled in the Manage Fields section for the user registration form or if there are any known issues with this setup in Drupal 10.4.0.

    Thanks for your help!

  • 🇬🇧United Kingdom joachim

    There's a separate form mode for registration. Can you check the field is configured to show on that?

  • Thank you @joachim for the clarification! I’ll check the configuration for the registration form mode and ensure the field is enabled there. I’ll update here once I’ve verified it.

  • Hey @joachim,

    I followed your suggestion and checked the "Register" form mode under "Structure > Display modes > Form modes". Here’s what I did:

    1. I accessed "Structure > Display modes > Form modes" and ensured that the "Register" form mode was enabled for the "User" type by
    editing the form mode and selecting the checkbox for "User."
    2. Then, I navigated to "Configuration > People > Account settings > Manage form display" and switched to the "Register" form mode tab.
    3. I enabled the "Favourite Genre" taxonomy field and configured its widget settings there.

    After completing these steps, the "Favourite Genre" field is now visible on the /user/register page, and everything is working as expected.
    Attaching a screenshot for the field settings and form mode.
    Thank you !

Production build 0.71.5 2024