Giter Club home page Giter Club logo

Comments (6)

janboddez avatar janboddez commented on July 17, 2024

Thanks for letting me know! What version of the plugin are you using? Which Mastodon instance?

  1. Would it be possible to enable WP debugging by adding the following to wp-config.php?
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

You should then see a textarea field on the settings page for this plugin that displays your Share on Mastodon settings. (Don't share them here! But you should then at least be able to see if a mastodon_client_id and secret were assigned, which should happen in the background when you first input and save your instance.)

Actually, there must be, otherwise the Authorize button would not be shown. They do get sanitized, though, before the plugin saves them to the db, so maybe they got corrupted there.

  1. Do you have access to your SQL db? Mind running something like DELETE FROM wp_options WHERE option_name = 'share_on_mastodon_settings'; (Best make a backup before. May need to adjust your database prefix.)

If not, that's okay, too. I plan to release next version very soon, and will at least add a way to recreate a client id and secret, and remove the superfluous sanitization.

from share-on-mastodon.

Clearmask avatar Clearmask commented on July 17, 2024

from share-on-mastodon.

janboddez avatar janboddez commented on July 17, 2024

Yeah, somehow the client ID or secret WordPress has stored for you isn't what your instance is expecting, which is stopping you from authorizing WP to access your Mastodon account by means of an access token.

If you deleted the plugin's settings (which does not happen on uninstall, for multiple reasons), you'd get assigned a new ID and secret, and chances are those would work.

The new version should be available soon. Today, perhaps, or tomorrow. And will include a couple changes that make switching accounts and wiping settings much easier, and storing tokens and such more robust.

from share-on-mastodon.

Clearmask avatar Clearmask commented on July 17, 2024

from share-on-mastodon.

janboddez avatar janboddez commented on July 17, 2024

All right. Not promising anything, but: you should now (or soon) be able to install v0.4.1, which comes with a back-end button to destroy all settings. You could probably just do that and then try again. The way the client ID and secret are saved also changed slightly, and I haven't had any issues testing things over here, so ... Fingers crossed.

One other thing's changed: if after you've installed the update, you deactivate and reactivate the plugin (or install from scratch), it should also check the validity of your access token in the background, once a day.

Should you find that posting to Mastodon suddenly stops working (like when you revoke the token from Mastodon's back end but not WordPress), you'll then notice the need to re-authorize on the settings page, and the blank token, in case debugging is enabled, in the settings "dump." (I'll add context and what not in a later version.)

It's probably safest to disable debugging after troubleshooting, and delete the debug.log file in wp-content (or elsewhere, if you've set it up that way) in case there is one.

from share-on-mastodon.

Clearmask avatar Clearmask commented on July 17, 2024

from share-on-mastodon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.