with current dev versions of openlayers, views and ctools, i currently get the following error for each item in my map view:
Notice: Undefined property: view::$row_index in views_handler_field->get_render_tokens() (line 1178 of /.../modules/views/handlers/views_handler_field.inc).
it worked fine before and i couldn't find any similar reports in the issue queues so far, can you reproduce this?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 0001-Issue-1115222-by-mr.baileys-Add-row-index-to-view.patch | 1.05 KB | mr.baileys |
| #6 | views_openlayers_render_tokens.patch | 665 bytes | dasjo |
Comments
Comment #1
josebrito commentedI have the same problem only with Views and Ctools.
According with the path seams an error on the views module on the views_handler_field.inc file with the code to reference the row index:
// Store the tokens for the row so we can reference them later if necessary.
$this->view->style_plugin->render_tokens[$this->view->row_index] = $tokens;
Comment #2
dawehnerThe patch in #1111258: Allow underscores in CSS classes fixes this problem.
Comment #3
dasjostill having problems with openlayers and views recently.
i have a basic openlayers configuration where i use separate float fields for latitude and longitude.
it works with version xxx of views, but i get the following warnings:
a list of
and
i described some similar issues at http://drupal.org/node/1111258#comment-4316334 where dereine responds that openlayers would need to set the row_index properly in order to work.
upgraded my views dev version today, the maps don't work anymore and the errors change to
looking forward to get openlayers to work with current views dev branch
Comment #4
dasjoComment #5
dasjodebugging into function
coalesce_wktofopenlayers_views_style_data<code> shows that <code>$featuresdoesn't contain the necessary lat/lng fields.tracked down the problem a little further and discovered, that when i save my openlayers view, all custom fields of the data overlay display are gone. adding the fields again won't help as they disappear as soon as i save the view. this seems to be the case for just any view i have setup. seems to be a known problem with views currently: #1126756: Views does not save new fields
Comment #6
dasjoavoid the problems with views fields by using views commit 3e51ad76b02ee90e06b7f798e8a28ca3e136fdb3.
this fixes the following two notices
eliminated the remaining views notice with the attached patch:
this essentially means, that views expects render_tokens and row_index to be set. the attached view patch adds a check if render_tokens exists.
i am not sure if this workaround is the way to go and we should push the patch to the views issue queue or if rather openlayers should set the values correctly
Comment #7
henrijs.seso commented#6 works but openlayers should definetly set the values correctly!
Comment #8
phayes commentedsubscribing. I will take a look at this
Comment #9
phayes commentedComment #10
mr.baileysAttached patch tackles the
Undefined property: view::$row_indexbug from the OP. I have not run into the other errors mentioned in this thread using up-to-date dev branches for CTools, Views and OpenLayers, so not sure whether or not those still need to be addressed.Comment #11
henrijs.seso commented#10 fixed issue for me. Because of cryptic title I did not notice this issue before and also found
map_featuresto be a problem, thanks mr.baileys for saving an hour of my life.Comment #12
dawehner@mr baileys:
You need to add a field with a token and boom there will be a problem.
@mansspams
Thanks for the better issue title
Comment #13
mr.baileys@dereine: can you elaborate? I'm using recent -dev versions with the patch from #10 applied, and there's no boom when using fields and tokens :)
Comment #14
dawehnerIn general i just try to help on this issue, so i never saw this problem in real life.
But in general style plugins should the row index, because some features (for example the field global: result counter) rely on this.
Comment #15
Countzero commentedMy bad : please discard this post.
Comment #16
zzolo commentedCommitted patch. Should be good.
http://drupalcode.org/project/openlayers.git/commit/b7e81a4
Comment #18
kurtzhong commentedSubscribe.