- Home
- Forum
- Angular - EJ 2
- Strange error on query builder
Strange error on query builder
Hello,

I started to have a strange problem with query builder lately, and I think that the only thing that I changed is that I added: [enablePersistence]="true" but I tried to remove this and even doing that, I am having this problem:
Sometimes(Its not always that this error happen), the first time that I select some field to filter, I get:
If I delete the condition and add again, it works. Since the problem just happen sometimes, I am thinking that could be something about the load time of data, or the fact that I am putting querybuilder inside a dropdown button, or something like that. Do you have any idea what can be happening here?
Thank you
SIGN IN To post a reply.
24 Replies
1 reply marked as answer
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 18, 2020 11:27 AM UTC
Hi Rafael,
We have checked your reported issue and we are able to reproduce it in our end. So, we confirmed this as a defect and planned to include the fix for this issue in our upcoming release. we appreciate your patience until then.
Regards,
Mohankumar R
RA
Rafael
August 18, 2020 01:06 PM UTC
Hi Mohankumar,
Ok, thank you very much
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 19, 2020 07:49 AM UTC
Hi Rafael,
Thanks for update.
This fix will be available in any of our upcoming patch release. Until then we appreciate your patience.
Regards,
Mohankumar R
RS
Rafael Stellato
August 24, 2020 03:26 PM UTC
Hi Mohan,
Ok, I am checking if there's an update here: https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/controls/querybuilder/CHANGELOG.md?utm_source=npm&utm_campaign=querybuilder
It's the best place to check this, right?
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 25, 2020 12:12 PM UTC
Hi Rafael,
We will include this fix in our Volume 3 2020 release which is estimated to be available in September 2020.And appreciate your patience until then. You can the track the same in the below feedback link.
Regards,
Mohankumar R
RS
Rafael Stellato
August 25, 2020 12:51 PM UTC
Hi Mohan,
So, this error is related to [enablePersistence]?
If yes, I can disable persistence until September.
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 26, 2020 02:03 PM UTC
Hi Rafael,
Thank you for the patience
We are glad to announce that our weekly patch release (18.2.0.55) is rolled out. We have included the fix for the reported issue in this release. So, we suggest you upgrade our Syncfusion packages to our latest version to resolve this issue in your end.
Please let us know if you need further assistance on this.
Regards,
Mohankumar R
Marked as answer
RS
Rafael Stellato
August 26, 2020 05:37 PM UTC
Hi Mohan,


I updated just the package of querybuilder(from 18.2.44 to 18.2.55) and the translations of filters like "Contains" stop to work:
Before:
Besides that, the filters in grid, is not working anymore, look:



And when I do a filter like contains "test":
So, I tried update the grid(from 18.2.44 to 18.2.55) too and, I got:
So, I returned all to version 18.2.44 again.
Am I doing something wrong?
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
August 27, 2020 04:51 PM UTC
Hi Rafael,
Sorry for the inconvenience caused. We have checked your reported query, we are unable to reproduce reported issue in our end. For your reference we have prepared a sample based on this, please refer below link.
If you are still facing the issue, kindly share the below details.
· If possible, try to reproduce the reported issue in provided sample or share the issue reproducible sample
Please provide the above requested information, based on that we will check and provide you a better solution quickly.
Regards,
Mohankumar R
RA
Rafael
September 2, 2020 11:11 PM UTC
Hi Mohan,
Just to update you, I am trying... I work all day to understand why its working normal in stackblitz, but when I update querybuilder in my software I lose all translations of querybuilder...
When I discover I will update here.
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
September 3, 2020 01:48 PM UTC
Hi Rafael,
We suspect that some duplicate packages might be installed in your ‘@syncfusion’ folder of ‘node_modules’. Please follow the steps provided in the following the below steps to overcome the reported behavior.
1. Delete package.lock.json file from your application.
2. Remove the @syncfusion package folder from the node_modules.
3. Use same version for all components in package.json file.
4. Then install the new packages.
Could you please follow the above step and get back to us with package.lock.json file if you still facing the same problem?
Regards,
Mohankumar R
RA
Rafael
September 3, 2020 02:51 PM UTC
Thank you very very very much!!!
I did this(delete package.lock.json) and now it's working again!
Yesterday I did everything to find the problem and didn't get it.
:D
RA
Rafael
September 3, 2020 06:36 PM UTC
Hi,

Now I am having problem when I select a field of type date in querybuilder:
I cant replicate in stackblitz too, so I think that is something related to package.lock.json too... I tried to do what you ask but did not work to solve this problem of calendar :(
RA
Rafael
September 3, 2020 07:18 PM UTC
The dependencies:
"dependencies": {
"@angular/animations": "~9.1.11",
"@angular/cdk": "^9.0.0",
"@angular/common": "~9.1.11",
"@angular/compiler": "~9.1.11",
"@angular/core": "~9.1.11",
"@angular/forms": "~9.1.11",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.11",
"@angular/platform-browser-dynamic": "~9.1.11",
"@angular/router": "~9.1.11",
"@ng-select/ng-select": "^3.7.2",
"@rxweb/reactive-form-validators": "^1.9.9-beta2",
"@syncfusion/ej2-angular-calendars": "^18.2.56",
"@syncfusion/ej2-angular-dropdowns": "^18.2.56",
"@syncfusion/ej2-angular-grids": "^18.2.56",
"@syncfusion/ej2-angular-navigations": "^18.2.55",
"@syncfusion/ej2-angular-popups": "^18.2.54",
"@syncfusion/ej2-angular-querybuilder": "^18.2.55",
"@syncfusion/ej2-angular-splitbuttons": "^18.2.54",
"cldr-data": "^36.0.0",
"moment": "^2.24.0",
"ng2-currency-mask": "^9.0.2",
"ngp-sort-pipe": "0.0.4",
"ngx-phone-mask-br": "^1.0.3",
"ngx-toastr": "^12.0.0",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.3"
},
Should I add @syncfusion/ej2-base or maybe @syncfusion/ej2-angular-base to get it work? I am trying everything here
Thank you
RA
Rafael
September 3, 2020 08:36 PM UTC
Hello,




This line is returning null:
I notice that if I remove this lines of my module:
it works, but the calendar lose the translation to portuguese.
I am trying to reproduce the problem here: https://stackblitz.com/edit/angular-9vr8dh-yup59v?file=app%2Fapp.module.ts
but if I uncomment this:
I got:
And I dont know why, because I installed cldr-data. Do you have any idea to solve this problem?
Thank you
MK
Mohan Kumar Ramasamy
Syncfusion Team
September 8, 2020 05:51 AM UTC
Hi Rafael,
We have validated your reported issue. We can reproduce the reported issue in our end. We have logged an issue report for this, and we will include this fix in our upcoming patch release. You can track the status in the below feedback link.
Regards,
Mohankumar R
RA
Rafael
September 8, 2020 12:05 PM UTC
Hi Mohankumar,
Thank you very much
SD
Saranya Dhayalan
Syncfusion Team
September 9, 2020 12:17 PM UTC
Hi Rafael,
Most welcome. As mentioned earlier we will include this fix in our upcoming patch release.
Regards,
Saranya D
RA
Rafael
February 9, 2021 02:22 PM UTC
Hi,


I update the querybuilder library to ^18.4.42 and now it working.
The problem now is that the querybuilder has lost all the translations that were working. I was translating like this:
In my shared.module.ts:
setCulture('pt');
L10n.load({
pt: {
grid: {
EmptyRecord: 'Sem registros',
GroupDropArea: 'Arraste o cabeçalho da coluna aqui para agrupar',
UnGroup: 'Clique aqui para desagrupar',
EmptyDataSourceError: 'DataSource não pode ser nulo',
Item: 'Item',
Items: 'Itens',
Columnchooser: 'Colunas',
ChooseColumns: 'Escolher colunas',
Search: 'Buscar',
CancelButton: 'Cancelar',
SelectAll: 'Todos',
CustomFilterPlaceHolder: 'Preencha o valor',
EnterValue: 'Preencha o valor',
Equal: 'Igual a',
NotEqual: 'Diferente de',
Contains: 'Contém',
StartsWith: 'Começa com',
EndsWith: 'Termina com',
GreaterThan: 'Maior que',
GreaterThanOrEqual: 'Maior ou igual',
LessThan: 'Menor que',
LessThanOrEqual: 'Menor ou igual',
ChooseDate: 'Escolha uma data',
Excelexport: 'Excel',
FilterButton: 'Filtrar',
ClearButton: 'Buscar',
True: 'Sim',
False: 'Não',
datepicker: {
placeholder: 'Teste',
today: 'Hoje',
}
},
pager: {
currentPageInfo: '{0} de {1} páginas',
totalItemsInfo: '({0} itens)',
firstPageTooltip: 'Ir para primeira página',
lastPageTooltip: 'Ir para última página',
nextPageTooltip: 'Ir para próxima página',
previousPageTooltip: 'Ir para página anterior',
pagerDropDown: 'Itens por página',
All: 'Todos'
},
datepicker: {
placeholder: 'Teste',
today: 'Hoje',
},
querybuilder: {
'AND': 'E',
'OR': 'Ou',
'AddGroup': 'Adicionar grupo de condições',
'AddCondition': 'Adicionar condição',
'DeleteRule': 'Excluir condição',
'DeleteGroup': 'Excluir grupo de condições',
'Edit': 'Editar',
'SelectField': 'Selecionar campo',
'SelectOperator': 'Selecionar operador',
'StartsWith': 'Começa com',
'EndsWith': 'Termina com',
'Contains': 'Contém',
'Equal': 'Igual a',
'NotEqual': 'Diferente de',
'LessThan': 'Menor que',
'LessThanOrEqual': 'Menor ou igual a',
'GreaterThan': 'Maior que',
'GreaterThanOrEqual': 'Maior ou igual a',
'Between': 'Está Entre',
'NotBetween': 'Não está entre',
'IsEmpty': 'É vazio',
'IsNotEmpty': 'Não é vazio',
'IsNull': 'É Nulo',
'IsNotNull': 'Não é Nulo',
'In': 'É',
'NotIn': 'Não é',
'Remove': 'Excluir',
'ValidationMessage': 'Esse campo é obrigatório',
'SelectValue': 'Preencha o valor'
}
}
});
loadCldr(
require('cldr-data/supplemental/numberingSystems.json'),
require('cldr-data/main/pt/ca-gregorian.json'),
require('cldr-data/main/pt/numbers.json'),
require('cldr-data/main/pt/currencies.json'),
require('cldr-data/main/pt/timeZoneNames.json'),
require('cldr-data/supplemental/weekdata.json')
); // To load the culture based first day of week
setCurrencyCode('BRL');
And when I call querybuilder element:
The way of translate has changed? In this link: https://ej2.syncfusion.com/angular/documentation/query-builder/global-local/ seems to be the same, but I cant translate anymore.
Thank you very much
GK
Gayathri KarunaiAnandam
Syncfusion Team
February 10, 2021 08:18 AM UTC
Hi Rafael,
We have checked your reported query. We cannot be able to reproduce the reported issue in the mentioned version. We have prepared a QueryBuilder locale sample based on your requirement. Please check the below link.
If you are still facing the issue, kindly share the below details.
- If possible, try to reproduce the reported issue in provided sample or share the issue reproducible sample
· Please share us the video demonstration of this issue.
Please provide the above requested information, based on that we will check and provide you a better solution quickly.
Regards,
Gayathri K
RA
Rafael
February 10, 2021 04:15 PM UTC
Hi Gayathri,


I am trying to reproduce your sample with my package.json to check if the problem is a version problem but I am getting this:
I dont know why, because in your sample, I think you are not using SplitButtons .. Anyway, maybe the problem is my package.json. I have not installed ej2-base or ej2-angular-base. Should I install? Look my package.json:
{
"name": "flow",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.11",
"@angular/cdk": "^9.0.0",
"@angular/common": "~9.1.11",
"@angular/compiler": "~9.1.11",
"@angular/core": "~9.1.11",
"@angular/forms": "~9.1.11",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.11",
"@angular/platform-browser-dynamic": "~9.1.11",
"@angular/router": "~9.1.11",
"@aspnet/signalr": "^1.1.4",
"@ng-select/ng-select": "^3.7.2",
"@rxweb/reactive-form-validators": "^1.9.9-beta2",
"@syncfusion/ej2-angular-calendars": "^18.2.56",
"@syncfusion/ej2-angular-dropdowns": "^18.2.56",
"@syncfusion/ej2-angular-grids": "^18.2.56",
"@syncfusion/ej2-angular-navigations": "^18.2.55",
"@syncfusion/ej2-angular-popups": "^18.2.54",
"@syncfusion/ej2-angular-querybuilder": "^18.2.55",
"@syncfusion/ej2-angular-splitbuttons": "^18.2.54",
"@techiediaries/ngx-qrcode": "^9.1.0",
"@types/googlemaps": "^3.43.2",
"angular2-text-mask": "^9.0.0",
"cldr-data": "^36.0.0",
"file-saver": "^2.0.2",
"moment": "^2.24.0",
"ng-brazil": "^2.0.10",
"ng2-currency-mask": "^9.0.2",
"ngp-sort-pipe": "0.0.4",
"ngx-mask": "^10.0.4",
"ngx-phone-mask-br": "^1.0.3",
"ngx-toastr": "^12.0.0",
"rxjs": "~6.5.4",
"text-mask-addons": "^3.8.0",
"text-mask-core": "^5.1.2",
"tslib": "^1.10.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.1",
"@angular/cli": "^9.1.9",
"@angular/compiler-cli": "~9.1.11",
"@angular/language-service": "~9.1.11",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.3.32",
"@types/node": "^12.11.1",
"@types/sweetalert": "^2.0.4",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.7.5"
}
}
I will try
Thank you very much
GK
Gayathri KarunaiAnandam
Syncfusion Team
February 11, 2021 02:35 PM UTC
Hi Rafael,
We have checked your reported query. You have to add ej2-base in your package.json file. We have prepared a sample by adding ej2-base dependency in your package.json file. Please check the below link and code snippet.
Package.json
|
{
"name": "flow",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.11",
"@angular/cdk": "^9.0.0",
"@angular/common": "~9.1.11",
"@angular/compiler": "~9.1.11",
"@angular/core": "~9.1.11",
"@angular/forms": "~9.1.11",
"@angular/material": "^9.2.4",
"@angular/platform-browser": "~9.1.11",
"@angular/platform-browser-dynamic": "~9.1.11",
"@angular/router": "~9.1.11",
"@aspnet/signalr": "^1.1.4",
"@ng-select/ng-select": "^3.7.2",
"@rxweb/reactive-form-validators": "^1.9.9-beta2",
"@syncfusion/ej2-angular-calendars": "^18.2.56",
"@syncfusion/ej2-angular-dropdowns": "^18.2.56",
"@syncfusion/ej2-angular-grids": "^18.2.56",
"@syncfusion/ej2-angular-navigations": "^18.2.55",
"@syncfusion/ej2-angular-popups": "^18.2.54",
"@syncfusion/ej2-angular-querybuilder": "^18.2.55",
"@syncfusion/ej2-angular-splitbuttons": "^18.2.54",
"@techiediaries/ngx-qrcode": "^9.1.0",
"@types/googlemaps": "^3.43.2",
"angular2-text-mask": "^9.0.0",
"cldr-data": "^36.0.0",
"file-saver": "^2.0.2",
"lodash": "~4.17.15",
"moment": "^2.24.0",
"ng-brazil": "^2.0.10",
"ng2-currency-mask": "^9.0.2",
"ngp-sort-pipe": "0.0.4",
"ngx-mask": "^10.0.4",
"ngx-phone-mask-br": "^1.0.3",
"ngx-toastr": "^12.0.0",
"rxjs": "~6.5.4",
"text-mask-addons": "^3.8.0",
"text-mask-core": "^5.1.2",
"tslib": "^1.10.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.900.1",
"@angular/cli": "^9.1.9",
"@angular/compiler-cli": "~9.1.11",
"@angular/language-service": "~9.1.11",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.3.32",
"@types/node": "^12.11.1",
"@types/sweetalert": "^2.0.4",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~2.1.0",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"protractor": "~5.4.3",
"ts-node": "~8.3.0",
"tslint": "~5.18.0",
"typescript": "~3.7.5"
}
} |
Please check the above link and get back to us, if you need further assistance.
Regards,
Gayathri K
RA
Rafael
February 11, 2021 06:56 PM UTC
Hi Gayathri,
The problem was in the package-lock.json file. I remove the file, npm install again and now it's working.
Thank you very much
GK
Gayathri KarunaiAnandam
Syncfusion Team
February 12, 2021 04:47 AM UTC
Hi Rafael,
Thanks for your update.
We are happy to hear that your issue has been resolved. Kindly get back to us if you need any further assistance.
Regards,
Gayathri K
SIGN IN To post a reply.
- 24 Replies
- 5 Participants
- Marked answer
-
RA Rafael
- Aug 14, 2020 03:01 PM UTC
- Feb 12, 2021 04:47 AM UTC