adaptdk / er_viewmode

Allows selection of viewmode per referenced entity
3 stars 4 forks source link

Issues with features #9

Open balapalanisamy opened 8 years ago

balapalanisamy commented 8 years ago

Hi,

I have installed this module recently and found that all my features are in overridden state. All the entity reference field types in my feature are showing as "er_viewmode" instead of "entityrefere.....". Is this is the way it works or this an issue.

feature_diff

lslinnet commented 8 years ago

Can you supply an diff of the affected field?

balapalanisamy commented 8 years ago

@lslinnet Added the screenshot(in the actual issue) of the feature which has lot of diffs (feature in overridden state). Actually I have not used the "er_viewmode" in this content type which has lot of entity reference fields and created this feature long back before adding the "er_viewmode" module. After adding this module all my content type features are in overridden state. I have checked this module(not completely because of time constraints) and I think I found the function causing the issue.

function er_viewmode_field_formatter_info_alter(&$info) { $info['entityreference_entity_view']['module'] = 'er_viewmode'; }
sumachaa commented 8 years ago

When using features in exporting and deploying; the 'view_mode' column is not getting created. This only gets created once we edit the field manually and save it again.

Is there any way to make this work using features itself?

lslinnet commented 8 years ago

@balapalanisamy firstly sorry for the late feedback, It is the expected behavior, it's basically just overwriting who handles the formatter of the field as it is no longer entityreference that handles it – but now er_viewmode which passes the request to entityreference if it is not going to be doing anything.

It do seem a little invasive but I haven't been able to identify another way to do this.

@sumachaa Please create a new issue for that and if you could supply a detailed example of how to reproduce it that would be much appreciated.

sumachaa commented 8 years ago

created new issue #10