a javascript file name is misspelled in gmap.module

http://drupalcode.org/project/gmap.git/blob/refs/heads/7.x-1.x:/gmap.mod...
- $file = file_save_data($contents, 'public://js/gmap_markers.js', FILE_EXISTS_REPLACE);
+ $file = file_save_data($contents, 'public://js/gmap_marker.js', FILE_EXISTS_REPLACE);

CommentFileSizeAuthor
#4 1413560-4.patch588 bytespodarok
#3 1413560-3.patch417 bytespodarok

Comments

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Patch (to be ported) » Needs work

can You provide a patch against latest dev?

alex.neblett’s picture

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

It appears to be in Line 352 of the latest dev as well.

$ret[variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_markers.js'] = array(
'type' => 'external',
'weight' => 2,
);

It should be:

$ret[variable_get('file_public_path', conf_path() . '/files') . '/js/gmap_marker.js'] = array(
'type' => 'external',
'weight' => 2,
);

Cheers,

Alex

podarok’s picture

StatusFileSize
new417 bytes

like this?

podarok’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
StatusFileSize
new588 bytes

the same for 7.x-1.x branch

podarok’s picture

Status: Needs review » Fixed

commited pushed to dev releases
tagged 7.x-2.4-beta4 testing release http://drupal.org/node/1927012

johnv’s picture

I doubt this: in the past, there were several issues (answered by the previous maintainer) where both different file names existed: with and without -s.

De -dev version of a few days ago (15-feb) worked fine . The current one (25-feb) doesn't. (not blaming this issue, though)
Currently, I have only the file 'gmap_markers.js' , not 'gmap_marker.js'.

But then again, the js files are added multiple times, so effects may be masked.

podarok’s picture

Status: Fixed » Needs work

#6 can You point us to that issues?

podarok’s picture

Yet one point to make tests for all!!!

alex.neblett’s picture

@johnv - Do you have both files? I only have gmap_marker.js. If so, is there a difference between the two? I agree with you that there are still issues with the module and many of them may have more to do with interactions between files and multiple versions. On an unrelated topic, do you still do much with calendar? I did not know if the issue with not having a legend per view has been addressed. I maintain a private version with some of your enhancements and mine that Karen had no interest in merging and at some point need to get it to where I can have a legend per view rather than a single shared legend.

For my part, the configuration page shows a map and it works fine, but I get no map if I am using lat and lon fields in a view. However, I get maps with nodes, etc. I have a few urgent projects I am working on, but will do some debuging to see where it is falling down at least in my configuration.

Cheers,

Alex

johnv’s picture

I edited my comment #6. It was not clearly stated, but I have only the file 'gmap_markers.js' on my system.
That is the one that is generated under https://example.com/admin/config/services/gmap (in 2.4 version).
I have to check for the 1.x version.

In which directory is your 'gmap_marker.js' file located?

sl27257’s picture

Hi,

I have both files on my system (7.x-1.1-beta2). And this a grep from the gmap-directory:

/var/www/drupal/sites/all/modules/gmap# grep gmap_markers\*\.js *
gmap.module:      drupal_add_js(variable_get('file_public_path', conf_path() . '/files')  . '/js/gmap_marker.js');
gmap.module:      drupal_add_js($path . 'gmap_marker.js');
gmap.module:  $ret[file_create_url('public://js/gmap_markers.js')] = array(
gmap.module:    $file = file_save_data($contents, 'public://js/gmap_markers.js', FILE_EXISTS_REPLACE);
/var/www/drupal/sites/all/modules/gmap#

It is clear that there are references to both files. If I rename the file from one version to the other I will find error messages in the log complaining about the other file is missing. BTW I assume it supposed to be the same file?

/Thomas

johnv’s picture

IMO, this patch should not have been committed. It lacks a error symptom.

Indeed, like #11, I have both files in my system:
- gmap_markers.js : /sites/all/files/js
- gmap_marker.js : /sites/all/modules/contrib/gmap/js
So, I expect the module to include both files, too. Either in the .module file or the .plugin file.

@sl27257, can you test #1929544: Fix for Relative Path from Root to gmap_markers.js to make Markers show

If I rename the file from one version to the other

- You are you changing the filename in gmap.module, I presume.

podarok’s picture

Status: Needs work » Closed (duplicate)