verbb / social-poster

A Craft CMS plugin for automatically posting entries to social media.
Other
89 stars 12 forks source link

2.3.2 required for Social Poster 5.0.2? #55

Closed ArchWinDoors closed 3 weeks ago

ArchWinDoors commented 1 month ago

Describe the bug

Trying to install trial on dev website / non-live and receive this error during installation: You need to be using at least Social Poster 2.3.2 before you can update to Social Poster 5.0.2. have tried via the command line also. Breaks the control panel until I uninstall it via command line

Steps to reproduce

  1. composer require verbb/social-poster && php craft plugin/install social-poster
  2. Lock file operations: 1 install, 0 updates, 0 removals
    • Locking verbb/social-poster (5.0.2) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 1 install, 0 updates, 0 removals
    • Downloading verbb/social-poster (5.0.2)
    • Installing verbb/social-poster (5.0.2): Extracting archive Generating optimized autoload files No security vulnerability advisories found. Using version ^5.0 for verbb/social-poster OK: You need to be on at least Social Poster 2.3.2 before you can update to Social Poster 5.0.2.

Craft CMS version

Craft Pro 5.3.4

Plugin version

5.0.2

Multi-site?

No response

Additional context

OS: Ubuntu 22.04.4 reported as Linux 5.15.0-117-generic for CraftCMS PHP version | 8.2.20 MySQL 8.0.39

engram-design commented 1 month ago

This means that at some point, Social Poster was installed on your site, but not removed properly - assuming you're just installing it not "fresh". The plugin is finding remnants of an old version, and trying to upgrade that, but failing because if you want to do an upgrade, you need to be on the latest previous major version to do so.

So it depends where your project is at. If you don't believe Social Poster has ever been used before, or you don't care about any data at the moment, then uninstall it properly through Settings > Plugins. There are manual ways to do this, but are more involved.

Or, if you've tried to do an upgrade and haven't upgraded to 2.3.2 first before going to 5.0, then there's no way around that - you need to do that first.

ArchWinDoors commented 1 month ago

Hello, Thank you for your reply. I think I did have Social Poster at some point - this project first used Craft 2.x I do not see it in my settings/plugins in control panel; I do not care about old data - I may have to remove the plugin from the database; any direction on which tables I'd need to look at would be helpful.

engram-design commented 1 month ago

The manual route of removal will be to remove some database tables:

Go to plugins and remove the row for social-poster as the handle.

Go to projectconfig and remove all rows where the path column includes the value plugins.social-poster.

And run ./craft project-config/rebuild from your console.

That should remove the plugin and old data, for you to install again fresh.

ArchWinDoors commented 1 month ago

Thank you for your instructions. Worked perfectly - hope this info assists others also!

ArchWinDoors commented 1 month ago

Now stuck on this issue: I followed the documentation (deleted all old / existing apps) and set up a new app for Twitter. After Saving / pressing Connect and I authenticate via OAuth, it returns me to Social Poster with this error: Unable to process callback for “twitter”: “Missing required parameter [code_verifier].” .[...]/vendor/verbb/auth/src/providers/Twitter.php:59

engram-design commented 1 month ago

Should be fixed for the next release. To get this early, run composer require verbb/social-poster:"dev-craft-5 as 5.0.2".

engram-design commented 3 weeks ago

Fixed in 5.0.3