Support from Acquia helps fund testing for Drupal Acquia logo

Comments

donSchoe’s picture

Issue summary: View changes
Status: Active » Fixed

This 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.

  • Commit 906c84d on 7.x-1.x by donSchoe:
    Issue #1951742 by drupallerina: Change machine names to uppercase if no...
donSchoe’s picture

Assigned: Unassigned » donSchoe

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

drupallerina’s picture

Thank you, the machine name is now capitalized.
Where would I set the label?

donSchoe’s picture

@drupallerina

Where would I set the label?

Go to Structure > Views > Your view > Fields > Your field > Tick the select box for "Create Label" and enter a label.

drupallerina’s picture

Title: Filter shows machine names instead of labels » Filter shows machine names instead of labels if view is imported via features
Status: Closed (fixed) » Active

Even 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.

donSchoe’s picture

Can 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.

ganeshenbabu’s picture

Issue summary: View changes

I'm also facing the same issue. Is there any solution for this?

ganeshenbabu’s picture

I 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

katyrose’s picture

I'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?

burnsjeremy’s picture

I 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.

partyp’s picture

I 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 :(

michel.g’s picture

I have solved it locally with the following patch I've written.

michel.g’s picture

Status: Active » Needs review
michel.g’s picture

Mhmm seems the 7.x-1.0-alpha4 release is outdated compared to the dev version.

michel.g’s picture

Status: Needs review » Needs work
michel.g’s picture

Seems I just created the patch from the wrong directory x.x

michel.g’s picture

michel.g’s picture

Status: Needs work » Needs review
wesjones’s picture

Thanks 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.

Status: Needs review » Needs work

The last submitted patch, 21: get_field_labels_1951742-21.patch, failed testing. View results

possiBri’s picture

Patch in #21 is working for us!