Views displaying users seem to miss "Description Content" from data sources.

I received the following error:
Notice: Undefined index: description_field in openlayers_views_style_data->map_features() (line 298 of /.../sites/all/modules/openlayers/modules/openlayers_views/views/

and then saw that the view simply does not have Description Content in data sources. There's an attached images demonstrating the bug.

Members fund testing for the Drupal project. Drupal Association Learn more


Kaloyan Petrov’s picture

Is somebody aware why the Description Field is only added for views of type "node"?, line 184:
// For node content type, we can render the node as with a specific
// view mode.
if ($this->view->base_table == 'node')

7wonders’s picture

Also wondering this. Commenting out/deleting line 186 and 227 (latest dev release) seemed to do the trick for me and got rid of the error but I dont know what other probs it will cause!

Undefined index: description_field in openlayers_views_style_data

rafaqz’s picture

Title: A view displaying users misses "Description Content " from OL Style options » Views displays lose the "Description Field" dropdown if the master display is not set to "data overlay"
Priority: Normal » Major

This is happening for my node based data overlays as well. I lose the description field dropdown whenever the master views style is not also set to "data overlay", and I'm assuming that's why it has happened to kayolan and 7wonders. Its pretty disastrous when it happens but there is a workaround, and for now I have set my master displays as data overlay and it seems to be ok.

It seems to be a bug with the handling of descriptions for individual view displays. I would help but my PHP isn't really up to writing a patch at this stage.

vasike’s picture

Title: Views displays lose the "Description Field" dropdown if the master display is not set to "data overlay" » "description_field/Description Content" Attribute issues

I thinks this is more generic issue, here are some aspects i could think about
1. Not available for all entities types, limited to node entities type
maybe this could be implemented for any type (Display suite could help for view modes)
2. this attribute it is used without an isset checking: missing "description_field/Description Content" attributes throw this error.

So maybe 1. could be a different new feature request issue and 2. could be solved here.

vasike’s picture

Status: Active » Needs review
3.02 KB

this is a patch to get rid of this notice messages

ckrina’s picture

Great: #5 patch worked for me.
I'm getting data from comment fields in a view.

zzolo’s picture

#5: 1370080-5.patch queued for re-testing.

zzolo’s picture

Priority: Major » Normal
Status: Needs review » Needs work

Hey @vasike. Thanks for the patch, but for some reason I was not able to apply it. Did you do it with git diff?

Pol’s picture

Status: Needs work » Needs review
3.55 KB

Re-rolled the patch for 7.x-2.x, needs feedback.

ifrik’s picture

Tried the patch against the latest dev version in #9 and did not get any error messages

Pol’s picture

Status: Needs review » Fixed

Thanks :)

mgriebe’s picture

I have applied the patch in #9 on a new install of dev. I get no error messages. But, I do not have a description field either.

The stable version allows for a description field for any entity in maps without the master page being openlayer.

***EDIT I managed to unintentionally update to 7.x-3.x-dev. This patch does indeed work for 7.x-2.x***

Status: Fixed » Closed (fixed)

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