Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having accidental duplicate FulltextSearch::enable() creates an error #27

Open
Batsis12 opened this issue Oct 19, 2022 · 1 comment
Open

Comments

@Batsis12
Copy link

If you have a duplicate FulltextSearch::enable() in your site or any of your module, it generates the below error on dev/build:

Uncaught SilverStripe\ORM\Connect\DatabaseException: Couldn't run query: ALTER TABLE "File" DROP INDEX "SearchFields", ADD fulltext "SearchFields" ("Name","Title","Name","Title") 42S21-1060: Duplicate column name 'Name'

@Batsis12 Batsis12 changed the title Having accidental duplicate FulltextSearch::enable() create an error Having accidental duplicate FulltextSearch::enable() creates an error Oct 19, 2022
@fonsekaean
Copy link
Member

Yes @Batsis12 this is a known problem. I never did anything about this as I thought its straightforward for the module to call FulltextSearch::enable(). But it'd be good to check whether any other module or the app had called it before the module doing it. Would you want to send a patch for that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants