born05 / craft-twofactorauthentication

Craft plugin for two-factor or two-step login using Time Based OTP.
MIT License
36 stars 26 forks source link

Couldn't install plugin #13

Closed xavierdemoor closed 6 years ago

xavierdemoor commented 6 years ago

`

Application Version
PHP version 7.2.8
Database driver & version MySQL 5.5.5
Image driver & version GD 7.2.8
Craft edition & version Craft Pro 3.0.19
Yii version 2.0.15.1
Twig version 2.5.0
Guzzle version 6.3.3
Imagine version 0.7-dev
Plugin Version
Empty Coalesce 1.0.0
Entry Instructions 1.0.0
Expanded Singles 1.0.4
Olivemenus 1.0.0
Redactor 2.1.5
Redactor Tweaks 2.0.2
SEOmatic 3.1.11

`

I tried to install the plugin via the plugin store, composer add it but I can't install it.

LukePeters commented 6 years ago

I'm encountering the same issue. Here's a screenshot - I press "Install" and this error pops up: https://img.lukepeters.me/080920180u9uo.png I don't see anything in the error logs. PHP version 7.1.16. Craft CMS version 3.0.19 (fully up-to-date).

brandonkelly commented 6 years ago

I’m seeing this in the logs:

2018-07-31 16:13:49 [192.168.10.1][1][-][error][craft\db\MigrationManager::migrateUp] Failed to apply Install (time: 0.002s). Output:
Exception: Calling unknown method: born05\twofactorauthentication\migrations\Install::_upgradeFromCraft2() (/home/vagrant/dev/craft3-test.test/vendor/yiisoft/yii2/base/Component.php:300)

Offending line:

https://github.com/born05/craft-twofactorauthentication/blob/99c3bf73d422e5d2d56db7a0c631901f9e7bc53d/src/migrations/Install.php#L14

Looks like you just need to drop the _.

brandonkelly commented 6 years ago

@xdemoor @LukePeters Until @roelvanhintum officially fixes this, you can get my fix by adding this to your composer.json file:

{
  "repositories": [
    {"type": "vcs", "url": "https://github.com/brandonkelly/craft-twofactorauthentication"}
  ]
}

And then run this command in your terminal:

composer require born05/craft-twofactorauthentication:"dev-patch-1 as 2.0.0-beta.6"
LukePeters commented 6 years ago

@brandonkelly This worked perfectly - thank you so much!

roelvanhintum commented 6 years ago

@brandonkelly Thanks for the fix! Just released it in 2.0.0-beta.7