I am posting it here because I found the issue while using Openatrium but I don't think it's an Openatrium bug per se.

backbone library has backbone-min.map
at the end of backbone-min.js there is this line:

/*
//@ sourceMappingURL=backbone-min.map
*/

When aggregation is turned on, backbone-min.map is expected to be found in the same directory as the backbone-min.js file which after aggregation is files/js.

I had to change the line to

/*
//@ sourceMappingURL=/profiles/openatrium/libraries/backbone-min.map
*/

Is this line necessary anyway?

This is a library issue so I am just noting it here. I am not quite sure what you could do other than adding it to the Readme file.

CommentFileSizeAuthor
#13 2235299-12.patch212 bytesxtfer
#11 2235299-11.patch202 bytesxtfer
#10 2235299-9.patch25.44 KBxtfer
#8 2235299-8.patch25.45 KBxtfer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

JKingsnorth’s picture

Confirmed this bug.

mpotter’s picture

Status: Active » Postponed

You should post this in the issue queue for the Navbar module since that is where the backbone.js dependency is being added. If there is a patch for this, let me know, or let Panopoly know, and we can include it. But this isn't something I can fix directly in OA2.

SocialNicheGuru’s picture

Project: Open Atrium » Navbar
Version: 7.x-2.x-dev » 7.x-1.x-dev
Issue tags: +navbar, +oa, +OpenAtrium

changing to this issue queue to make you aware too

SocialNicheGuru’s picture

Status: Postponed » Active
SweetTomato’s picture

What do we lose by losing access to that file? It's missing in mine as well with advagg, but other than performance, I'm not aware of how it hurts our application.

bkildow’s picture

I believe this is only seen with Chrome dev-tools. This has some information on how to avoid or fix this: http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-ma....

jasonlttl’s picture

I'm sure this is a dumb solution but....

The following is some sample code to register a menu entry for the js aggregation based backbone-min.map path. If the libraries module is installed and the backbone library is found, it will redirect the incorrect backbone path to the correct one and you'll stop getting 404's for this in watchdog.

/**
 * Implements hook_menu().
 */
function osu_core_menu() {
  $items = array();
  if (osu_core_backbone_map_path()) {
    $items['sites/%/files/js/backbone-min.map'] = array(
      'title' => 'Chrome DevTools Workaround',
      'description' => 'See https://www.drupal.org/node/2235299',
      'page callback' => 'osu_core_backbone',
      'access arguments' => array('access content'),
    );
  }
  return $items;
}

/**
 * Returns the path to backbone-min.map or FALSE if expected file does not exist.
 */
function osu_core_backbone_map_path() {
  $path = FALSE;
  if (function_exists('libraries_get_path')) {
    $root = getcwd();
    $library = libraries_get_path('backbone', TRUE);
    $candidate = $root . $library . '/backbone-min.map';
    $path = is_readable($candidate) ? $candidate : FALSE;
  }
  return $path;
}

/**
 * Page callback to redirect to backbone-min.map if library installed.
 */
function osu_core_backbone() {
  $path = osu_core_backbone_map_path();
  if ($path) {
    $library = libraries_get_path('backbone', FALSE);
    drupal_goto($library . '/backbone-min.map');
  }
  else {
    print '';
    drupal_exit();
  }
}
xtfer’s picture

Status: Active » Needs review
Issue tags: -navbar, -oa, -OpenAtrium
FileSize
25.45 KB

This is causing issues with the Panels IPE.

The following patch can be applied in a .make file to remove the code from the backbone library.

If a .make file was provided for navbar, it could be resolved there.

Status: Needs review » Needs work

The last submitted patch, 8: 2235299-8.patch, failed testing.

xtfer’s picture

FileSize
25.44 KB

Tagged release and archive not in the same format, for some reason.

xtfer’s picture

Status: Needs work » Needs review
FileSize
202 bytes

And again, since the previous one wouldn't apply anyway.

Status: Needs review » Needs work

The last submitted patch, 11: 2235299-11.patch, failed testing.

xtfer’s picture

Status: Needs work » Needs review
FileSize
212 bytes

And another for Underscore, which suffers from the same issue.

xtfer’s picture

Title: files/js/backbone-min.map not found » Aggregation breaks use of library min.map files from included libraries

Status: Needs review » Needs work

The last submitted patch, 13: 2235299-12.patch, failed testing.

Marko B’s picture

I have the same problem when I turn on JS aggregation.

Remote Address:127.0.0.1:80
Request URL:http://site.dd/sites/default/files/js/backbone-min.map;
Request Method:GET
Status Code:404 Not Found

What I find strange is that Request URL:http://site.dd/sites/default/files/js/backbone-min.map; ends with ;

hass’s picture

I think we need to have a core aggregation case to remove all occurences of sourceMappingURL and sourceURL including //@ and //# syntax.

hass’s picture

hass’s picture

Status: Needs work » Postponed

Please join #2400287: Remove all occurences of sourceMappingURL and sourceURL when JS files are aggregated and test the patches to get them committed to all core versions.

I'm postponing here in hope more people see it and help testing. Normally we mark such cases as duplicate at later stage. We may need to add a known issue information somewhere to the module.

hass’s picture

Status: Postponed » Closed (duplicate)

Since this is a core issue I'm closing now. Please help getting it into core.

Marko B’s picture

Marko B’s picture