Discourse Unlock

If you have a standard install, and are comfortable with the server side of things, you can access the rails console using:

cd /var/discourse

./launcher enter app

rails c

And to disable chat:

SiteSetting.chat_enabled = false

Though hopefully we should have this conflict ironed out soon so Chat and Unlock play nicely with each other again. :slightly_smiling_face::crossed_fingers:

4 Likes

Since he was comfortable with rails, that was the easiest way to do it. Another is to add this to the env: section of app.yml:

DISCOURSE_CHAT_ENABLED: false

This works with all site settings; it overrides the database and removes the setting from /admin/settings.

4 Likes

I just merged this fix. Let me know if it works now with chat enabled

7 Likes

I have just upgraded and it works for me. :partying_face: :+1:

4 Likes

I’d love to see this with Monero.

1 Like

Though I’m not facing any such difficulty (of broken site, nor have I activated this ‘unlock’ plugin yet), but still, even though I’ve ‘Discourse Chat’ plugin and my site does have chat activated, there is no such line (as ‘Discourse_Chat_Enabled’) in my ‘Web_only.yml’ file.

Am I missing something?

Hi @kam44 , I was wondering if this could be used for the log in of Discourse, so it only allows members with a certain NFT in their wallet to access. :thinking:

+1 (real cryptocurrency)

Yes, could be a next feature, to also login with unlock, meanwhile you should check the Sign-In with Ethereum discourse plugin : GitHub - spruceid/discourse-siwe-auth: Discourse plugin for SIWE authentication

2 Likes

Not bad at all! But to setup that all the crown, this should be extended to all payments…

Hi there guys, I have an issue now that I am trying to customise the plugin, its not showing my locks on the paywall for a starter so I’m not sure why that is happening, but secondly, I am trying to update my 2x custom locks to new addresses and I have implemented them in the plugin but they are now not unlocking.

Safe to say Ruby and Docker are not my friends, so any help would be greatly appreciated! Paid help more than welcome at this stage as I am loosing my hair…

1 Like

Hello friends.

I have updated to latest Discourse version, and then installed Unlock plugin.

After creating Lock, that will require BSC BEP20 Token to open locked content on category, i got address to add to Discourse plugin.

After doing that, adding 56 as NetworkID for Binance Smart Chain, then i try to simulate all and i always get this.

Something went wrong…

To report this, please open an issue with the event ID and details on github or tell us about it on discord.

Error
can’t convert undefined to object

Event ID
8686f5e2ac1847df98d90c959f382444

Any clue what could be the problem?

Check the logs at your_forum.com/logs, it might give you some infos

1 Like

thanks, this is what i have found our when i try to open locked category, to simulate paying with token.

Job exception: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.

net-pop-0.1.2/lib/net/pop.rb:1004:in check_response' net-pop-0.1.2/lib/net/pop.rb:897:in initialize’
net-pop-0.1.2/lib/net/pop.rb:566:in new' net-pop-0.1.2/lib/net/pop.rb:566:in do_start’
net-pop-0.1.2/lib/net/pop.rb:530:in start' /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:39:in poll_pop3’
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:14:in execute' /var/www/discourse/app/jobs/base.rb:292:in block (2 levels) in perform’
rails_multisite-5.0.0/lib/rails_multisite/connection_management.rb:82:in with_connection' /var/www/discourse/app/jobs/base.rb:279:in block in perform’
/var/www/discourse/app/jobs/base.rb:275:in each' /var/www/discourse/app/jobs/base.rb:275:in perform’
/var/www/discourse/app/jobs/base.rb:346:in perform' mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:122:in process_queue’
mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:70:in worker_loop' mini_scheduler-0.16.0/lib/mini_scheduler/manager.rb:59:in block (2 levels) in ensure_worker_threads’

I’m not familiar with Binance Smart Chain network and how it works with Unlock but from what you’ve given us, it looks like an issue with Unlock and not Discourse?

That error message is from Unlock and you should probably go to their GitHub / Discord to get some help.

3 Likes

I can not login to app by metamask

https://app.unlock-protocol.com/locks

It seems ok. But you should change to right network first.

Hello,

Did anyone used this plugin before? Is it possible for you please to share concrete examples of use?

Hello,

Is the plugin still working ?

I added it but can’t connect to it, nothing is happening at this stage

I’m using Metamask with Polygon

This just lock categories. Could you develop to lock every topic/post?