jQuery-QueryBuilder icon indicating copy to clipboard operation
jQuery-QueryBuilder copied to clipboard

Uncaught TypeError: Cannot set property 'extendext' of undefined

Open ravidannani opened this issue 9 years ago • 6 comments

Hi,

I was stuck up with this issue from last 2 days and not sure how to resolve this issue.

I had implemented the query builder for angular2 application by following the below reference link. https://embed.plnkr.co/13rGVC/. But it was shown below error in console window.

jqueryextendextissue

Even though it was working properly and able to generate JSON expression by calling getRules., But unable to generate SQL expression by calling 'getSQL' . I thought this is because of the above issue and started searching online but could not get much information.

Below are the more information related to this issue. [1]. Executing the below method from my component file getSQLStatement() { var result = $('#builder').queryBuilder('getSQL'); console.debug(result) if (!jQuery.isEmptyObject(result)) { alert(JSON.stringify(result, null, 2)); } return result; }

[2]. From there, referencing the querybuilder.min.js. Attached is the file

querybuilder.min.txt

Note - I have tried to use query builder standalone version instead of querybuilder.min.js but no luck.

Please let me know if I missed anything or need more information.

ravidannani avatar Aug 18 '17 00:08 ravidannani

As the documentation says you either need to include "doT.js" and "jQuery.extendext.js" or use the standalone version.

The error you mention is not present in your plunkr.

And I have not problem making "getSQL" or "getESBool" methods working either.

So what exactly is your problem ?

mistic100 avatar Aug 18 '17 06:08 mistic100

Thank you for your response.

I also imported both dot and jQuery.extendext and imported in my type script file in the below way. But still showing the same issue.

import doT from 'dot/doT'; import jQueryExtendext from 'jquery-extendext';

The plunkr link is working with the standalone version. But for me, it is throwing issues.

Is there any way to come up from this issue? Please let me know.

ravidannani avatar Aug 18 '17 09:08 ravidannani

FYI,, After calling the getSQL, getting the below error in type script

image

ravidannani avatar Aug 18 '17 10:08 ravidannani

Hi,

I am still having the query builder issue. Please check the error in below.

image

I am getting this issue while calling 'getSQL' or 'getMongo'. It is working for 'getRules'

Could you please please please let me know the issue cause and take me to forward..

ravidannani avatar Sep 20 '17 07:09 ravidannani

Hi @mistic100

Have tried all ways to get query builder to work but have been unable to (after 2 tough days) any help would be appreciated

Getting query-builder.standalone.min.js:7 Uncaught TypeError: Cannot set property 'extendext' of undefined

Shouldn't get this if using standalone version of query builder

My index.html is below:

Thanks in advance and regards Toby

index.html.docx

tobysmith61 avatar Oct 19 '18 15:10 tobysmith61

Hi @tobysmith61 I faced the same issue and I resolved by including 'query-builder.standalone.js' file instead of 'query-builder.js' .Hope it may help others

hassantahir01 avatar Jun 02 '19 17:06 hassantahir01