-
Notifications
You must be signed in to change notification settings - Fork 6
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
SQL Error in Subscriptions Widget #13
Comments
@AugustMiller Ahh yes - I think this is due to Commerce changing the way plans are referenced (https://github.com/craftcms/commerce/blob/develop/CHANGELOG-v2.md#security) I'll push a fix for this tomorrow. |
@AugustMiller I can't seem to replicate this issue. I've hit you up on Slack but doesn't look like you've been on. If you can jump on there or post more details in here we can solve this 💪 |
This is embarrassing—I think I'd only tried this on a site without any subscriptions configured? Unfortunately, I can't get a test subscription set up at the moment, but I'm curious to know whether emptying your available Subscriptions produces the same error? Edit: Probably worth investigating for the ding-dongs like me who click around hastily, and might inadvertently take down their dashboard 😉 (Or maybe hiding the widgets that don't apply to the apps where it's installed?) |
@AugustMiller I think hiding widgets that don't apply is a good idea! I'll be pushing a fix for this later this week :) |
FYI—tried a few more widgets, and even relevant ones seem to generate SQL errors. It seems most errors are just mismatched column names, or potentially issues with case-sensitivity? For context, this app uses Postgres—apologies for not mentioning this in the original issue! |
@AugustMiller I'll run tests using a Postgres database then - But could you paste some of the errors your getting in to this issue? |
So sorry this has dragged on! 😥 Got a couple messages for you—overall, it seems like the case sensitivity in Postgres is responsible for most of these?
|
@AugustMiller I'm having difficulties fixing this issue, as I've just installed the widgets on a fresh site that only has orders (No subscriptions) and the widgets / CMS doesn't error when enabling subscriptions widgets with no plans available. Also with the Postgres errors, they do look like case errors, but looking at my queries i'm targeting them with the correct case (Not like it says in the error). Is there any more information you can give, or if your happy to jump on Slack one day we can bash this error out a bit easier? |
When adding the Subscriptions widget to the dashboard, it no longer loads, and presents the following error:
Unfortunately, I don't know enough about joins to understand why this isn't working (
planId
is indeed a column in thecommerce_subscriptions
table…), so my fussing with the source didn't unearth an explanation.This is in version 2.0.9, on Craft 3.0.28, and Commerce 2.0.0-beta.12.1.
Let me know if you need any other info!
The text was updated successfully, but these errors were encountered: