-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Unable to Re-enable Twitter Channel After Disabling #437
Comments
Hello @DerLeole , I find it as an interesting issue to work on. I would like to work on this issue. Please assign this issue to me. |
The same happens with BluySky btw, I believe there is just no way to re-enable a service that has been disabled |
FYI, a workaround is to access the DB and manually enable the integration again, with something like:
|
Hey all, so I looked into this, and it actually happens with any integration. There is a menu option and code to re-renable integrations, but the code is checking how many integrations you are allowed on your "plan", as it has to do this on the paid-version. In the free version, I think the code is making the assumption you have a plan with 0 allowed integrations. I will continue trying to look at this, and I'll submit a fix if I can, but I probably can't merge that kind of fix until @nevo-david confirms that he's happy with that fix - I don't want to break the paid verison of Postiz. |
Okay! I found it. This took a bunch of searching through the source code. When assigning the user's tier (and therefore "totalChannels"), Postiz checks if STRIPE_PUBLISHABLE_KEY is set (stripe is a billing API, so, not used in the self-hosted version). Because it isn't set, it set's the user's tier to ULTIMATE, as found in this line of code;
However, when looking at the database, the "Subscriptions" table is empty - there is no "ULTIMATE" plan, so getting the subscription means that null values are used, or in the case of totalSubscriptions, which is a number, 0 is returned. We can see this check taking place here;
I just added a subscription into the database manually for my organization ID, and that fixes the problem - I can then enable channels again! insert into "Subscription" ("organizationId", id, "subscriptionTier", "period", "totalChannels", "updatedAt") VALUES ('77598a36-4bb1-4f50-98e0-80c96442a380', gen_random_uuid(), 'ULTIMATE', 'MONTHLY', 999, now()); So, there are a few possible fixes
|
Fixed in f4a4d8a :-) Please update to the latest version of Postiz to fix this. |
📜 Description
Once a Twitter channel is disabled in Postiz, there is no way to re-enable it. No error messages are shown when attempting to re-enable
👟 Reproduction steps
👍 Expected behavior
👎 Actual Behavior with Screenshots
💻 Operating system
Linux
🤖 Node Version
Docker
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
Are you willing to submit PR?
None
The text was updated successfully, but these errors were encountered: