For some reason I'm getting this error in the theme information bit when editing a view. The map totally fails to appear also. Looking through the code, latest dev and a few versions back I can't see that this ever existed. Beta 3 did have a template but not within the views submodule.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

monymirza’s picture

Priority: Normal » Major
hutch’s picture

Just a guess, try editing leaflet_views.views.inc as follows:
replace line 22

'theme' => 'leaflet-map',

with

'theme' => 'leaflet_map',
massiws’s picture

Two years have gone, but this issue is still present in 7.x-1.3 and 7.x-1.x-dev.

What suggested in #2 is good, but to make error disappear you have to add a file 'leaflet-map.tpl.php' (or one of those suggested by Views) in leaflet_views folder.

Despite this, however, Leaflet seems to use its own template file.

robertwb’s picture

@massiws can you list the other related modules that you are using? I cannot reproduce this issue by simply using Leaflet module alone (or in combo with Geofield).

massiws’s picture

@robertwb: I'm using drupal 7.41, leaflet 7.x-1.3 and leaflet_views.

Other modules I'm using are geofield, geocoder, geophp, leaflet_markercluster, leaflet_more_maps and ip_geoloc: I tried to disable latest three modules but the message still appear.

As opposed to what reported by monymirza, my map show regularly (using which template?): is error message only a warning by Views?

As previously sad, to make the message disappear, I have to:

  • change the template name from 'leaflet-map' to 'leaflet_map'
  • add the template file (in leaflet or theme folder).

I attach an image with the error message.

ps: sorry, I made a little mistake in previous patch: here is the right one (if needed).

RdeBoer’s picture

Haven't looked at the code, but maybe sites/all/modules/leaflet is (incorrectly) assumed, rather than sites/all/modules/contrib/leaflet ?

hutch’s picture

The patch needs to be made from the leaflet module folder, not from the drupal root. The attached patch does that, it can be installed by installing the patchfile into a fresh clone of the leaflet project and using

patch -p1 < Template_file_not_found-2223627-6.patch
DrCord’s picture

The patch in #7 worked perfectly for me.

  • RdeBoer committed e505e9c on 7.x-1.x authored by hutch
    Issue #2223627 by massiws, hutch: Views: leaflet-map.tpl.php (File not...
RdeBoer’s picture

Assigned: Unassigned » RdeBoer
Status: Active » Fixed

Patch applied.
Phew... that was hard... :-)
Rik

Status: Fixed » Closed (fixed)

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

jasonsavino’s picture

I am using 7.x-1.4, which has the "leaflet-map" changed to "leaflet_map" but there is still no leaflet-maps.tpl.php file in the leaflet/leaflet_views/ directory. I was able to make the error go away with one of 3 option:
1. remove 'theme' => 'leaflet_map'
2. create a file named leaflet-map.tpl.php in the leaflet/leaflet_views directory based on code from the views-view-unformatted.tpl.php
3. create a file named leaflet-map.tpl.php in my theme based on code from the views-view-unformatted.tpl.php

I chose option 3 but it seems that it's best to have the template file in the module.