Quote from: BobRay at Oct 02, 2015, 11:53 PMI think it's saying that the table for your BbProducts object doesn't have a 'resource' field/column.
Thank you Bob!
I realized I made a mistake in my previous test; I forgot I changed the database name to circumvent the issue with the prefix. So I tested this tag:
[[!SimpleSearch? &customPackages=`BbProducts:aei:modxbbproducts:core/components/modxbbproducts/model/:BbProducts.resource = modResource.42`]]
Didn't make a difference...! Same error message.
Following your suggestion I made changes to the tag (see below) but I still don't understand what 'joinCriteria' does and I would like to find out!
The instructions (
https://rtfm.modx.com/extras/revo/simplesearch/simplesearch.simplesearch#SimpleSearch.SimpleSearch-SearchingCustomTables) say the following:
"joinCriteria - The SQL to join the table you want to search and the modResource table. Your table must have some connection to the Resource it's on (otherwise SimpleSearch won't know how to load a URL for it!)" and the example is:
&customPackages=`QuipComment:body:quip:{core_path}components/quip/model/:QuipComment.resource = modResource.id
Thinking my field name is 'aei' I've changed 'BbProducts.resource' into 'BbProducts.aei', like this:
[[!SimpleSearch? &customPackages=`BbProducts:aei:modxbbproducts:core/components/modxbbproducts/model/:BbProducts.aei = modResource.42`]]
Which gives this error:
[2015-10-03 17:11:09] (ERROR @ /index.php) Error 42S22 executing statement:
Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'modResource.42' in 'on clause'
)
So maybe the change I made is good but now it goes to the next problem...? Originally I put in '42' because it's my landing page, and since, like I said before, I still don't know how 'joinCriteria' works, I changed it to 'modResource.id', like in the example.
Tag:
[[!SimpleSearch? &customPackages=`BbProducts:aei:modxbbproducts:core/components/modxbbproducts/model/:BbProducts.aei = modResource.id`]]
This doesn't give an error but it gives the "there are no search results..." message.
I think I need more help!!