Closed (fixed)
Project:
Leaflet
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2012 at 20:19 UTC
Updated:
27 Nov 2013 at 20:12 UTC
Jump to comment: Most recent
Comments
Comment #1
pvhee commentedNice work, exactly what is needed.
We'd probably need to work out an upgrade path or at least provide some sort of warning, since existing views using display modes will render with plenty of errors and you'd need to enable Entity API as well (which makes sense).
I had some issues with rendering the full node display in JS (line 11 of leaflet.drupal.js). This probably doesn't come from the code, but maybe we should clean the output to make it safe to render in the popup?
Comment #2
joelrosen commentedBy any chance does the full node display you were trying to render contain a field rendered as a Leaflet Map? That would cause this error: http://drupal.org/node/1796656, which would explain things.
I don't really agree that the module should concern itself with cleaning rendered node output. I'm not having any problems using teaser view modes, and I think if the user really needs to do some special processing to their rendered entity output, they can implement template_preprocess_entity or something.
So, for an upgrade path, I guess the answer is to implement hook_update_N to 1) make sure Entity API is enabled and 2) search for any saved Views displays and replace the options for the old view modes with #rendered_entity, ya? Do you know what number I should use for N here? I guess it depends on what stable version you plan introducing this to... not really sure how that works.
Comment #3
pvhee commentedYes, you're right. The "full" view mode contained a geofield formatted with the Leaflet map, which breaks the rendering of the map. Removing that field from the display fixed things.
I've committed your patch, and I've added leaflet_views_update_7000 in leaflet_views.install, so you need to add entity api before upgrading.
We should still find a way to have the views converted, so leaving this issue open.
Comment #4
levelos commentedClosing, it's been a year.