We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45118
    • 123 Posts
    Quote from: Bruno17 at Sep 26, 2015, 04:19 PM
    your packageName is aeibbproducts, not aei_bbproducts
    Okay, fixed that, now the error message is this:

    [2015-09-27 00:25:19] (ERROR @ /index.php) Could not get table name for class: Bbproducts
    [2015-09-27 00:25:19] (ERROR @ /index.php) Error 42S02 executing statement:
    Array
    (
    [0] => 42S02
    [1] => 1146
    [2] => Table 'arch4503_modx2.Bbproducts' doesn't exist
    )
      • 3749
      • 24,544 Posts
      Did you maybe change the schema but not regenerate the class and map files?
        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 Sep 27, 2015, 01:39 AM
        Did you maybe change the schema but not regenerate the class and map files?
        Nope!
          • 48532
          • 23 Posts
          Quote from: redhen at Sep 26, 2015, 11:04 AM

          Hi Bruno,
          I tried the tag with the change
          [[!SimpleSearch? &customPackages=`[b]Bbproducts[/b]:aei:aei_bbproducts:core/components/aeibbproducts/model/:bbproducts.resource = modresource.42`]]


          >>
          Could not get table name for class: Bbproducts

          Class name is: BpProducts
          See Bruno's answer
          Quote from: Bruno17 at Sep 25, 2015, 02:35 PM
          your class is

          (…)
          but has to be

          &customPackages=`BbProducts:aei:

            • 45118
            • 123 Posts
            Quote from: just_nico at Sep 27, 2015, 05:30 PM

            Class name is: BpProducts
            See Bruno's answer
            Thanks, I didn't read that right!
            Now the error message is this:
            [2015-09-28 18:25:15] (ERROR @ /index.php) Error 42S02 executing statement:
            Array
            (
            [0] => 42S02
            [1] => 1146
            [2] => Table 'arch4503_modx2.modx_bb_products' doesn't exist
            )
            It seems we're getting closer...
            The correct table name is: 'arch4503_modx2.aei_bb_products', with aei as table prefix instead of modx. Now the question is how to make the script create the right table name?
              • 4172
              • 5,888 Posts
              seems you can't define a custom-prefix or an empty prefix with simpleSearch.

              Could you rename your table to modx_bb_products or will that produce other issues?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 45118
                • 123 Posts
                Quote from: Bruno17 at Sep 28, 2015, 01:44 PM
                seems you can't define a custom-prefix or an empty prefix with simpleSearch.

                Could you rename your table to modx_bb_products or will that produce other issues?
                I would have to change a lot of snippets, but maybe to make this work, it's worth it?
                  • 4172
                  • 5,888 Posts
                  or file an issue at github to make it possible to add custom-prefixes or empty prefixes.

                  you could hack it in here at this line:

                  https://github.com/modxcms/SimpleSearch/blob/master/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php#L90
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 45118
                    • 123 Posts
                    Quote from: Bruno17 at Sep 28, 2015, 03:31 PM
                    or file an issue at github to make it possible to add custom-prefixes or empty prefixes.

                    you could hack it in here at this line:

                    https://github.com/modxcms/SimpleSearch/blob/master/core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php#L90
                    Thanks Bruno, but I don't know the first thing about how to change that. I made some feeble attempts but only managed to break the script. Can you help me on the way?

                    On another note, is there any other search extra that would better serve my needs?

                    Thanks, Paulien
                      • 45118
                      • 123 Posts


                      Quote from: Bruno17 at Sep 28, 2015, 01:44 PM
                      Could you rename your table to modx_bb_products or will that produce other issues?
                      Okay, I made a copy of my table "aei_bb_products" and named it "modx_bb_products". Now I can keep trying to make SimpleSearch work and I don't have to change my snippets (yet). This time I get a different error message.

                      This is the tag:
                      [[!SimpleSearch? &customPackages=`BbProducts:aei:aeibbproducts:core/components/aeibbproducts/model/:BbProducts.resource = modresource.42`]]
                      This is the error message:
                      [2015-09-30 15:19:38] (ERROR @ /index.php) Error 42S22 executing statement:
                      Array
                      (
                      [0] => 42S22
                      [1] => 1054
                      [2] => Unknown column 'BbProducts.resource' in 'on clause'
                      )
                      This probably has something to do with "joinCriteria", which I didn't really understand how to use in the first place. Anybody any ideas?