You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A client asked for help implementing a search that also includes searches through Lingua translations. While I got the following package definition per the docs and some debugging:
... it doesn't work because lingua requires the package to be added with the table prefix. The package itself doesn't specify it, so the addPackage call needs to support that. It's a bit of an odd way to handle table prefixes in my opinion, but alas, it's a valid supported one in MODX.
In core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php, I had to add the tablePrefix like this around line 91:
A client asked for help implementing a search that also includes searches through Lingua translations. While I got the following package definition per the docs and some debugging:
... it doesn't work because lingua requires the package to be added with the table prefix. The package itself doesn't specify it, so the addPackage call needs to support that. It's a bit of an odd way to handle table prefixes in my opinion, but alas, it's a valid supported one in MODX.
In
core/components/simplesearch/model/simplesearch/driver/simplesearchdriverbasic.class.php
, I had to add the tablePrefix like this around line 91:That obviously breaks on the next upgrade and also doesn't support using different packages.
Would be ideal if SimpleSearch were to be updated to support specifying the tableprefix, perhaps as an optional 6th argument.
The text was updated successfully, but these errors were encountered: