Closed peteeveleigh closed 5 years ago
Do you have Commerce installed? I think this error might appear when you try to install the plugin without Commerce installed first?
Hi @engram-design
That was it. Commerce wasn't installed 🤦♂
I installed Commerce and tried again. Still no luck. Removed Events. And Reinstalled. No luck. Removed Events. Checked the database and could see the tables still there so removed them manually. Reinstalled and.... WIN!
Can't believe I didn't realise that's what was wrong.
Many thanks
FYI, I have added a better error message to be shown in this instance, in 1.1.7
Unable to install the plugin.
In control panel, clicking install shows the flash message "Unable to install plugin".
The database tables are created but the following SQL error is shown in the logs
Exception: SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
The SQL that fails is:
ALTER TABLE
events_purchasedticketsADD CONSTRAINT
events_purchasedtickets_lineItemId_fkFOREIGN KEY (
lineItemId) REFERENCES
commerce_lineitems(
id) ON DELETE SET NULL
There is also an error