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 8298215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:41:20+00:00 2026-06-08T15:41:20+00:00

My app is built using backbone. I run into problems when trying to use

  • 0

My app is built using backbone. I run into problems when trying to use destroy() on a model, this is the error stack I get in chrome:

Uncaught TypeError: Cannot call method 'remove' of undefined backbone-min.js:34
f.extend.remove backbone-min.js:34
g.Events.trigger backbone-min.js:9
f.extend.destroy.d backbone-min.js:14
f.extend.destroy backbone-min.js:14
Backbone.Model.extend.remove ticketModel.js:21
Backbone.View.extend.deleteTicket ticketListView.js:44
b.each.b.forEach underscore-min.js:11
Backbone.View.extend.deleteTicketTickets ticketListView.js:49
f.event.dispatch jquery-1.7.2.min.js:3
f.event.add.h.handle.i

Any idea what this could be?

The code causing the error was literally just:

model.destroy();

model does certainly contain a model as a console.log(model) logs the object to the console as it should.

Here’s the model definition:

define([
    'apiEndpoint'
    ],function(apiEndpoint) {
    var TicketModel = Backbone.Model.extend({
        url: apiEndpoint.url,

        isTicket : function(){
            return ( this.type === 'ticket') ? true : false;
        },

        isTask : function(){
            return ( this.type === 'task') ? true : false;
        },

        //Tells you if the view is selected for bulk actions
        defaults : {
            isSelected: false
        },

        remove : function(){
            this.destroy({success: function(){
                console.log('success');
            }});
        }

    });
    return TicketModel;
});
  • 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-08T15:41:21+00:00Added an answer on June 8, 2026 at 3:41 pm

    In your view Why are you calling model.destroy();? I think that you must call model.remove(); because is your custom method to destroy.

    Looks like in your View you are calling model.destroy() and later model.remove, but because you already destroyed your model, now you are trying to call a remove method of undefined object.

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

Sidebar

Related Questions

So, I have this desktop app built using WPF and C#. It's basically an
Sending Email in Android using JavaMail API without using the default/built-in app I'm trying
We recently built a web app using Prototype, making a fair amount of use
Help! I have a clickonce app built and published using .Net 2.0. This app
During development, our Android app is built using Eclipse (ADT). We use an eclipse
Hi Does anyone know of an app built using( or showcasing the use of)
I have a dynamic list loaded into a HTML 5 web app built using
I have an iPhone app which was built using a standard UITabBarController. This app
I have inherited a half-finished mobile app built using Backbone.js (which I have never
I have built a web app using backbone.marionette . When, from a Marionette.ItemView ,

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.