I installed and enabled the backbone module and its dependencies. I am testing out the backbone_example module and ran into some js errors. When I click the "load" form button to load a node, nothing happens but there is a js console log:

GET http://example.net/backbone/rest/node/23.json 404 (Not Found)

I did some investigating and found that the url http://example.net/backbone/rest/node/23 (without .json extension) is valid. I also found that in backbone/js/drupalbackbone.js on line 49 the .json file extension is added. I am not sure what is the expected url (with or without the .json extension). Is this a Services or Services_views bug that the .json extension should be appended?

Comments

dooug’s picture

Status: Active » Fixed

Nevermind, my bad. It is probably a server configuration issue on my end here. I think the .json extension wasn't being allowed.

dooug’s picture

Found the real issue that I had: #1460882: 404 on .json request

Status: Fixed » Closed (fixed)

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

rmarino’s picture

I have drupal running in http://example.net/folder/ and the backbone_example module also provides 404 errors as it tries to fetch from http://example.net/backbone/rest/node/6.json, not including the "/folder"

To fix it, I added the basePath on drupalbackbone.js, line 46.

url: function() {
          // Modified from Backbone.js to ignore collection and add ".format" extension.
          var base = Drupal.settings.basePath + this.restEndpoint + this.urlRoot || urlError();
rmarino’s picture

Issue summary: View changes

cleanup