Use profile type label instead of "profile" in local actions and add form page title

Created on 16 May 2023, almost 2 years ago

Problem/Motivation

I created my profile_type (multiple) with a Label and even Display label, but the local action and the add form page title say "Add Profile" instead of "Add [my Label / Display label]".
Is it possible to change it programmaticaly without hacking Profile module itself?
Thank you

Feature request
Status

Active

Version

1.0

Component

User interface

Created by

🇮🇹Italy kopeboy Milan

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

Merge Requests

Comments & Activities

  • Issue created by @kopeboy
  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States dww

    Yup, I needed exactly the same. Thanks for opening the issue about it.

    Here's the start of a solution. This fixes the 'Add profile' local action. Still "needs work" to also fix the page title of the add form itself.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    18 pass, 2 fail
  • 🇺🇸United States dww

    This fixes the title of the add form, too. I reproduced the test fails locally, so that's coming next. 😅 Fixing version so we can open an MR, instead of patches.

  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    23 pass
  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States dww

    354f8f43 should fix the failing tests, but it might be cheating. 😅 Shows this is a potentially disruptive change. Not sure if we need to make this behavior a setting that folks have to opt into.

  • Pipeline finished with Failed
    2 months ago
    Total: 290s
    #409602
  • Pipeline finished with Success
    2 months ago
    #409617
  • 🇺🇸United States dww

    Still need this. 😅 There were merge conflicts, so I rebased the MR. There's a phpcs and phpstan (max PHP version) failure in profile.module that's untouched by this MR. Not sure what's going on with that, but seems out of scope to fix it here.

    phpcs

    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     71 | ERROR | [x] Parameter $items has null default value, but is not marked as
        |       |     nullable.
        |       |     (SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue.NullabilityTypeMissing)
    

    phpstan (max PHP version)

     ------ ----------------------------------------------------------------------- 
      Line   profile.module                                                         
     ------ ----------------------------------------------------------------------- 
      71     Deprecated in PHP 8.4: Parameter #4 $items                             
             (Drupal\Core\Field\FieldItemListInterface) is implicitly nullable via  
             default value null.                                                    
     ------ ----------------------------------------------------------------------- 
     [ERROR] Found 1 error                                                          
    

    Trivial fix, but seems out of scope. Not sure why this pipeline is complaining about it, since I didn't touch that and it's identical in the 8.x-1.x branch (which seems to be passing).

  • First commit to issue fork.
  • Pipeline finished with Skipped
    2 months ago
    #409966
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024