We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45118
    • 123 Posts
    Can anyone help me further with this? Pretty please smiley
      • 3749
      • 24,544 Posts
      I think it's saying that the table for your BbProducts object doesn't have a 'resource' field/column.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 45118
        • 123 Posts
        Quote from: BobRay at Oct 02, 2015, 11:53 PM
        I 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!! tongue
          • 3749
          • 24,544 Posts
          I'm not really familiar with how the search works, but I'm pretty sure this:

          BbProducts.aei = modResource.42`


          Means find records where the BbProducts aei field is equal to the modresource 41 field. Since the modResource object doesn't have a field named 42, that's bound to fail.

          Maybe you mean this?

          BbProducts.aei = modResource.id`


            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting