Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9195249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:35:18+00:00 2026-06-17T21:35:18+00:00

I am building my first Backbone app with similar structure to this Todo MVC

  • 0

I am building my first Backbone app with similar structure to this Todo MVC example with Require.js and also using Backbone LocalStorage. Problem is when I run TweetsCollection.fetch() in HomeView, firebug gives me error: TypeError: options is undefined var method = options.update ? 'update' : 'reset';

TweetsCollection:

    define([
    'underscore',
    'backbone',
    'backboneLocalStorage',
    'models/TweetModel'
], function(_, Backbone, Store, TweetModel) {

'use strict';

    var TweetsCollection = Backbone.Collection.extend({

        model: TweetModel,

        localStorage: new Store('tweets-storage'),

        initialize: function() {
            console.log('Collection init...');
        }

    });

    return new TweetsCollection();

});

HomeView init:

initialize: function() {
            this.listenTo(TweetsCollection, 'add', this.addOne);
            this.listenTo(TweetsCollection, 'reset', this.addAll);
            this.listenTo(TweetsCollection, 'all', this.render);

            TweetsCollection.fetch(); // <- Error here
        },

I try to follow the example above, but I’m really lost with this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:35:19+00:00Added an answer on June 17, 2026 at 9:35 pm

    The line of code where the error occurs is in Backbone’s success callback that gets executed by Backbone.sync. Here’s what that method looks like in Backbone 0.9.10:

      options.success = function(collection, resp, options) {
        var method = options.update ? 'update' : 'reset';
        collection[method](resp, options);
        if (success) success(collection, resp, options);
      };
    

    Prior to version 0.9.10, Backbone callback signature was:

    options.success = function(resp, status, xhr) { ...
    

    The Backbone.localStorage plugin, which you are evidently using, executes the callback method as follows (line 146):

      if (options && options.success)
        options.success(resp);
    

    As you can see, it doesn’t pass the arguments in correct order, and is missing the options argument altogether, which is where you are seeing the error.

    So it would seem that the Backbone.localStorage plugin is currently incompatible with the newest Backbone version.

    Edit: I went to report this issue to the author of the localStorage plugin, but looks like there is already a GitHub issue and pull request to fix this. It’s not merged yet, so in the meantime you can use phoey’s fork or downgrade to Backbone 0.9.9

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building my first ASP.Net MVC based app and have a problem accessing
I'm using backbone for an app that I'm building. In this app, I have
I'm building my first web app using Backbone.js. So far so good. I'm looking
I'm building my first Backbone.js app and I'm confused about how much responsibility I'm
Building my first web app using Yii and wondering if it is best to
I'm busy building my first MVC app that uses the Telerik MVC components. Their
I'm new to the world of coffeescript (javascript). Currently building my first backbone.js app
I'm building my first Rails project - its a ToDo app, which are supposed
I am building my first ASP.NET MVC site and this site needs to be
I'm building my first Django app to manage multiple SaaS products. This entails storing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.