I have been using Profile 8.x-1.0-alpha5 on my site for several months without issue. I have now upgraded to Drupal 8.4 and am now trying to upgrade Profile to 8.x-1.0-rc1. Once upgraded however all of my profiles have had their "Label" changed. For example:
The profile type is called "Company". On 8.x-1.0-alpha5 my profile labels were:
Company profile of BMW
Company profile of Ford
Company profile of Honda
but on 8.x-1.0-rc1 these have changed to:
Company profile #1
Company profile #2
Company profile #3
Please can you tell me why this is happening and how to fix it? Thanks!
Tom
Comments
Comment #2
pradeepjha commentedI'm using beta-1 version even that has also same issue. Profile label is showing like:
profile profile #1
profile profile #2
profile profile #3
My profile type is "Profile". Is there anyway we can fix this to make proper label?
Comment #3
maaty388 commentedThis was changed in this issue. There is code for label
If this works as expected you should be able to override your label. I am not sure how exactly you can change label but there is a new event so I am sure this is working just fine.
Comment #4
jasonawantfixing this for site requires writing code, need to add event subscriber to this new PROFILE_LABEL event.
I think the module would better serve more users by providing a configuration option to the ProfileTypeForm that would allow site builders to use tokens or something.
Comment #5
maaty388 commentedI was thinking to set token module as dependency and then on this path /admin/config/profile/profile-settings would be for now one text field with token extension... And for a default value, I would set as it's now '@type profile #@id'. Also, I don't really know where to put menu link, for now, I just put it under config-> profile types -> Profile Form...
We need to discuss that before implementing this into a module.
I think it would be really user-friendly if there is an available form where you can set different options, and you don't need to change everything programmatically, at this point I don't even know if its possible to change profile labels?
Waiting for feedback
Comment #6
maaty388 commentedHere is the patch and work done so far.
Need to figure out how to get replaced tokens so they can be used as a label. It can be a little bit tricky because I don't know what parameters need to be passed to replace function.
Comment #7
maaty388 commentedComment #8
drupgirl commentedThanks for starting this. The generic label causes pain when you go to use an entity reference field and see a long list of "Member profile #1, etc., ". Using token fields from the profile type or the user would be ideal. +1 for feature request. https://www.drupal.org/project/profile/issues/2900573
Comment #9
imclean commentedComment #10
bojanz commentedLet's continue in #2900573: Make profile label able to be saved and so work with Auto Entity Label or other alterations that work on save then.