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.
Media Browser Plus moving around JS file to different places silently and generates a missing paths in GMap module, see:
#1931138: Fixing all 'single marker' issues
Dump from debug:
-> media_browser_plus_move_file($tid = '2418', $file = class stdClass { public $fid = NULL; public $uri = 'public://js/gmap_markers.js'; public $filename = 'gmap_markers.js'; public $filemime = 'application/x-javascript'; public $uid = '1'; public $status = 1; public $timestamp = 1378829679; public $filesize = 4202; public $type = 'undefined'; public $field_folder = array ('und' => array (...)) }, $replace = 0, $save = FALSE) sites/all/modules/media_browser_plus/media_browser_plus.file.inc:22
-> file_unmanaged_move($source = 'public://js/gmap_markers.js', $destination = 'public://', $replace = 0) sites/all/modules/media_browser_plus/media_browser_plus.module:479
Comment | File | Size | Author |
---|---|---|---|
#3 | file-exclusions-2085857-1.patch | 1.47 KB | jami3z |
Comments
Comment #1
jami3z CreditAttribution: jami3z commentedAny status on this? Should this be handled at the gmap end or MBP?
Comment #2
jami3z CreditAttribution: jami3z commentedAfter thinking about this I thought it might be a good thing to have the possibility to exclude certain files that you may not want to be moved by MBP. This would then solve this issue and possibly others that may arise from other modules with the same thing. Ill try and provide a patch.
Comment #3
jami3z CreditAttribution: jami3z commentedHere is my patch!
Comment #4
kenorb CreditAttribution: kenorb commented'filesnames' should be called 'filenames'.
Comment #5
kenorb CreditAttribution: kenorb commentedComment #6
jami3z CreditAttribution: jami3z commentedJust found out my patch is incorrect and does not work properly. Check should be done in the file_presave function. Will provide revised patch (including spelling mistake @kenorb discovered)
cheers
Comment #7
das-peter CreditAttribution: das-peter commentedHmm, this is wired. I don't think I fully understand the problem.
The concept is that MBP takes care of all files registered in the table
file_managed
, because well they should be managed.If
gmap_markers.js
is registered in the table it will be handled by MBP.However if it's not registered there MBP has to ignore it.
The question now is, is
gmap_markers.js
registered or not?If it is I'd say its a bug in gmap.
if it isn't this is a bug in MBP.
Comment #8
thijsvdanker CreditAttribution: thijsvdanker commented@das-peter: I had the same problem and agree that it should be done right on gmap's side.
I've created a patch there that should sort this problem out.
https://drupal.org/node/2185395
Comment #9
thijsvdanker CreditAttribution: thijsvdanker commentedComment #10
izus CreditAttribution: izus commentedthe issue mentionned in #9 is solved, and so should be this issue's status