Changing "Create new account" button text breaks admin/user/user/create form

Created on 11 January 2008, over 16 years ago
Updated 16 May 2023, about 1 year ago

Greetings,

I noticed the following problem which was in Drupal 5.0 and looks still not fixed.

After I changed a text on "Create new account" button to any other text using form_alter hook (ex: "Register now") admin/user/user/create form stopped to function properly - it doesn't do anything. However, user/register form works.

It is quite a critical defect because in 9 of 10 projects clients are not satisfied with default "Create new account" text and would like to change it to something else.

The problem looks to be common - in some cases changing button text breaks form which is bad because form functioning should not be tied with text on the button.

Thanks.

πŸ› Bug report
Status

Needs work

Version

7.0 ⚰️

Component
User moduleΒ  β†’

Last updated about 7 hours ago

Created by

πŸ‡ΊπŸ‡¦Ukraine ardas

Live updates comments and jobs are added and updated live.
  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

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.

  • πŸ‡«πŸ‡·France anrikun

    Here's a workaround in the meantime.

    In a custom module (called custom_user in example below), add:

    <?php
    /**
     * Implements hook_menu_alter().
     */
    function custom_user_menu_alter(&$items) {
      // Override user_admin() for op create.
      $items['admin/people/create']['page callback'] = 'custom_user_admin_create';
    }
    
    /**
     * Overrides user_admin() for op create.
     */
    function custom_user_admin_create() {
      $build['user_register'] = drupal_get_form('user_register_form');
      return $build;
    }
    ?>
Production build 0.69.0 2024