Item10670: JS Error: SyntaxError: missing ) in parenthetical nofile_a:0
Priority: Normal
Current State: New
Released In: n/a
Target Release: n/a
Accessing
TaxonProfile/Definitions.WC_Bonds makes an error in mongod primary:
Sat Apr 23 09:11:48 [conn235] JS Error: SyntaxError: missing ) in parenthetical nofile_a:0
Sat Apr 23 09:11:48 [conn235] Count with ns: foswiki__TaxonProfile__Relationships.current and query: { $where: " ( (1) ) && ( ( ( ( ( ( foswiki_getField(this, 'FORM.name') == 'Taxo..." } failed with exception: exception: 10070 $where compile error
Sat Apr 23 09:11:48 [conn235] assertion 10070 $where compile error ns:foswiki__TaxonProfile__Relationships.current query:{ orderby: { FIELD.Relationship.value: 1 }, query: { $where: " ( (1) ) && ( ( ( ( ( ( foswiki_getField(this, 'FORM.name') == 'Taxo..." } }
In Foswiki this makes:
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: searching mongo : $VAR1 = {
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: '$where' => ' ( (1) ) && ( ( ( ( ( ( foswiki_getField(this, \\'FORM.name\\') == \\'TaxonProfile.Relationships.RelationshipForm\\' \\'||\\' foswiki_getField(this, \\'FOR
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: M.name\\') == \\'TaxonProfile/Relationships.RelationshipForm\\' \\'||\\' foswiki_getField(this, \\'FORM.name\\') == \\'TaxonProfile/Relationships/RelationshipForm\\' \\'||\\' foswiki_getField(this, \\'FORM.name\\') == \\'TaxonProfile.Relationships/RelationshipForm\\' ) ) ) && ((foswiki_getField(foswiki_getRef(\\'localhost\\', foswiki_getDatabaseName(this._web)+\\'.current\\', this._web, foswiki_getField(this, \\'FIELD.Source.value\\')), \\'FIELD.Namespace.value\\')) == \\'WC\\') ) && ((foswiki_getField(foswiki_getRef(\\'
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: localhost\\', foswiki_getDatabaseName(this._web)+\\'.current\\', this._web, foswiki_getField(this, \\'FIELD.Destination.value\\')), \\'FIELD.Namespace.value\\')) == \\'WC\\') ) && ( foswiki_getField(this, \\'FIELD.Source.value\\') == \\'TaxonProfile/Definitions.WC_Colour\\' \\'||\\' foswiki_getField(this, \\'FIELD.Destination.value\\') == \\'TaxonProfile/Definitions.WC_Colour\\' ) ) '
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: };
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: , $VAR1 = {
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: 'sort_by' => {
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: 'FIELD.Relationship.value' => 1
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: }
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr:
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: };
[Sat Apr 23 09:12:19 2011] [warn] [client 123.123.123.123] mod_fcgid: stderr: query took 0.003193
--
PaulHarvey - 22 Apr 2011
I think this is the JS:
( (1) ) && ( ( ( ( ( ( foswiki_getField(this, 'FORM.name') == 'TaxonProfile.Relationships.RelationshipForm' '||' foswiki_getField(this, 'FORM.name') == 'TaxonProfile/Relationships.RelationshipForm' '||' foswiki_getField(this, 'FORM.name') == 'TaxonProfile/Relationships/RelationshipForm' '||' foswiki_getField(this, 'FORM.name') == 'TaxonProfile.Relationships/RelationshipForm' ) ) ) && ((foswiki_getField(foswiki_getRef('localhost', foswiki_getDatabaseName(this._web)+'.current', this._web, foswiki_getField(this, 'FIELD.Source.value')), 'FIELD.Namespace.value')) == 'WC') ) && ((foswiki_getField(foswiki_getRef('localhost', foswiki_getDatabaseName(this._web)+'.current', this._web, foswiki_getField(this, 'FIELD.Destination.value')), 'FIELD.Namespace.value')) == 'WC') ) && ( foswiki_getField(this, 'FIELD.Source.value') == 'TaxonProfile/Definitions.WC_Colour' '||' foswiki_getField(this, 'FIELD.Destination.value') == 'TaxonProfile/Definitions.WC_Colour' ) )
--
PaulHarvey - 23 Apr 2011
Here is the borked search:
%SEARCH{"(form.name='TaxonProfile.Builder.TermForm' OR
form.name = 'TaxonProfile/Builder.TermForm' OR
form.name = 'TaxonProfile/Builder/TermForm' OR
form.name = 'TaxonProfile.Builder/TermForm' ) AND
parent.name='{'name' => 'WC_BehaviourConspecific'}'"
type="query"
web="TaxonProfile.Definitions"
}%
--
PaulHarvey - 23 Apr 2011
Cool, here's what produced that search:
"(form.name='TaxonProfile.Builder.TermForm' OR
form.name = '%BUILDERWEB%.TermForm' OR
form.name = '%BUILDERWEB%/TermForm' OR
form.name = 'TaxonProfile.Builder/TermForm' ) AND
parent.name='%IF{
"parent.name/parent.name AND parent.name/parent.name!='WebHome'"
then="%QUERY{"parent"}%"
else="This_totic_will_neBer_eXist"
}%'"
Evidently
%QUERY{"parent"}%
should actually be
%QUERY{"parent.name"}%
--
PaulHarvey - 23 Apr 2011
really need the query parser not to send broken-ness to the algo's, but wow, i wonder how.
--
SvenDowideit - 23 Apr 2011
What's confusing is that the error message shown in Foswiki seems to show that the query doesn't parse, an inline foswikiAlert is shown, and yet the algo evaluates it anyway?
--
PaulHarvey - 23 Apr 2011
you get a red error from
SEARCH irrespective of where it comes from
in this case, i think its just the reply from mongodb
Bonds Could not perform search. Error was: Missing operator in '(form.name='TaxonProfile.Builder.TermForm' OR
form.name = 'TaxonProfile/Builder.TermForm' OR
form.name = 'TaxonProfile/Builder/TermForm' OR
form.name = 'TaxonProfile.Builder/TermForm' ) AND
parent.name='{'name' => 'WC_BehaviourConspecific'}''
--
SvenDowideit - 23 Apr 2011
Here's a good one:
| 2011-05-21T17:57:11Z debug | SEARCH crash: TaxonProfile/Definitions.Vert: SEARCH{"RelationshipForm.Destination/Namespace='WC' AND RelationshipForm.Source/Namespace='WC' AND RelationshipForm.Relationship='SKOS_ExactMatch'"...
Caused the following error:
query error: $where compile error
-------
|
--
PaulHarvey - 23 May 2011