Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#21 | get_field_labels_1951742-21.patch | 5.34 KB | wesjones |
#19 | get_field_labels_1951742_19.patch | 13.22 KB | michel.g |
#18 | get_field_labels_1951742-18.patch | 5.43 KB | michel.g |
#14 | get_field_labels_1951742-14.patch | 5.53 KB | michel.g |
Comments
Comment #1
donSchoe CreditAttribution: donSchoe commentedThis is because there is no label set for the field.
This is no bug for this module. It's using the machine name as fallback if no label is available. As a special service I will capitalize the first letter if machine name is used. For example "title" is now "Title". That's all I can do if no label exists.
Comment #3
donSchoe CreditAttribution: donSchoe commentedComment #5
drupallerinaThank you, the machine name is now capitalized.
Where would I set the label?
Comment #6
donSchoe CreditAttribution: donSchoe commented@drupallerina
Go to Structure > Views > Your view > Fields > Your field > Tick the select box for "Create Label" and enter a label.
Comment #7
drupallerinaEven if labels are set in the feature, these have to be edited and saved manually once to make the active filters display the labels instead of the field names.
Comment #8
donSchoe CreditAttribution: donSchoe commentedCan you confirm this only affects views dynamic fields? I can reproduce this issue but from what it looks like this is a issue with the features module.
Comment #9
ganeshenbabu CreditAttribution: ganeshenbabu commentedI'm also facing the same issue. Is there any solution for this?
Comment #10
ganeshenbabu CreditAttribution: ganeshenbabu commentedI enabled this module later only so that the label is not updated. After I force applied (that mean.. editing each fields and apply) thane it works fine
Comment #11
katyrose CreditAttribution: katyrose commentedI'm having this issue as well. Manually editing the labels works fine for the page display, but for a content pane, dynamic fields will display the machine name instead of the label seemingly no matter what. Anyone have any ideas?
Comment #12
burnsjeremy CreditAttribution: burnsjeremy as a volunteer commentedI had the same issue with a recent project. I will be off of that project for a little while but when we start it back up in January I hope to look more into the issue and get this fixed. I can confirm that if your labels come out as machine names in a view that is exported into features your labels will always be machine names for this particular module (I have not seen any other modules do this). However, you can go to each field in the view after a feature revert and save each field (don't change them) and then save the view that your field labels will update and show correctly after that. They will stay like that until the next time that you revert your features. So there are a couple of ways around the issue but it would still be nice if it were fixed. The one thing that I didn't try was to rebuild all of my features forcefully, that may work but I highly doubt it.
Comment #13
partyp CreditAttribution: partyp commentedI am having the same issue and can confirm that burnsjermy #12 comment will fix the issue temporarily until the next time you revert features, although this is far from ideal. It's becoming a real pain to save those fields each time after a deployment :(
Comment #14
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedI have solved it locally with the following patch I've written.
Comment #15
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedComment #16
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedMhmm seems the 7.x-1.0-alpha4 release is outdated compared to the dev version.
Comment #17
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedComment #18
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedSeems I just created the patch from the wrong directory x.x
Comment #19
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedComment #20
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedComment #21
wesjones CreditAttribution: wesjones commentedThanks for the patch michel.g
I just found one bug in the patch - The selectable fields in the exposed filter were not shown if they weren't also selected to show by default.
Applied a fix and removed formatting changes that were not related to this patch.
Comment #23
possiBriPatch in #21 is working for us!