Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#7 | Template_file_not_found-2223627-6.patch | 962 bytes | hutch |
#5 | Template_file_not_found-2223627-5.patch | 1.16 KB | massiws |
#5 | img.png | 25.77 KB | massiws |
#3 | Template_file_not_found-2223627-3.patch | 1.2 KB | massiws |
Comments
Comment #1
monymirzaComment #2
hutch CreditAttribution: hutch commentedJust a guess, try editing leaflet_views.views.inc as follows:
replace line 22
with
Comment #3
massiws CreditAttribution: massiws commentedTwo 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.
Comment #4
robertwb CreditAttribution: robertwb commented@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).
Comment #5
massiws CreditAttribution: massiws commented@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:
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).
Comment #6
RdeBoerHaven't looked at the code, but maybe sites/all/modules/leaflet is (incorrectly) assumed, rather than sites/all/modules/contrib/leaflet ?
Comment #7
hutch CreditAttribution: hutch commentedThe 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
Comment #8
DrCord CreditAttribution: DrCord commentedThe patch in #7 worked perfectly for me.
Comment #10
RdeBoerPatch applied.
Phew... that was hard... :-)
Rik
Comment #12
jasonsavino CreditAttribution: jasonsavino commentedI 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.