MapSVG Plugin with undefined is not a function (near ‘….success(function(data){…’)

Inspect Element from Chrome

I have 2 separate projects using MapSVG plugin. however, on the other project it keeps displaying this error which it puzzled me how was the error occurred to the site which there’s is no difference from the file neither configurations that I am applying.

Here’s what the browser find:

While I tried to sneak down to the code, and it seems fine to me.

MapSVGDatabaseService.prototype.getAll = function(params){
    var _this = this;

    // if table isn't created yet then return empty array
        defer = $.Deferred();
        var obj = [];
        defer.success = defer.done;
        return defer;

    params = params || {};
    var filters = params.filters || null; = parseInt( :;
    var perpage = params.perpage? parseInt(params.perpage) : this.perpage;
    var search =;
    var searchField = params.searchField;
    return $.get(ajaxurl, {
        action: 'mapsvg_data_get_all',
        search: search,
        searchField: searchField,
        filters: filters,
        sortBy: this.sortBy,
        sortDir: this.sortDir,
        perpage: perpage,
        map_id: this.map_id,
        table: this.table
    }, null, 'json')
        .success(function(data){ //**This is where error caught by inspect element**//
                _this.hasMoreRecords = _this.perpage && (data.length > _this.perpage);
                _this.rows = _this.formatData(data);
                _this.hasMoreRecords = false;
                _this.rows = [];


What could possibly the cause of this issue?

Read more here: MapSVG Plugin with undefined is not a function (near ‘….success(function(data){…’)

Leave a Reply

Your email address will not be published. Required fields are marked *