craftpulse / craft-password-policy

Enforce a password policy on your Craft CMS users.
MIT License
27 stars 9 forks source link

Craft 3.0.12 unable to install plugin. #4

Closed justin-masse closed 6 years ago

justin-masse commented 6 years ago

Rias,

I'm unable to install the password-policy plugin anymore. I had been able to last week but I'm now getting an error: ReflectionException: Class rias\passwordpolicy\assetbundles\PasswordPolicy\PasswordPolicyAsset does not exist in /opt/craft/craft/vendor/yiisoft/yii2/di/Container.php:428

It appears that the "PasswordPolicy" folder under\assetbundles\is expected to be camel-case but in your code it is all lowercase. I'm not sure if this is the root cause (due to a recent change in Craft or Yii2) but when I change this folder name to camel-case and then change line :48 in PasswordPolicyAsset.php::init() to use the new camel-case folder name I'm able to successfully install/use the plugin again.

riasvdv commented 6 years ago

Thanks for reporting :) should be fixed in 1.0.3

justin-masse commented 6 years ago

@Rias500 thank you! Do you by chance know what the root cause was? The only update I noticed in my project was craft versions but that seems unlikely to be the root cause! Maybe a Craft dependency that was updated in 3.0.11 or 3.0.12?

riasvdv commented 6 years ago

Don't know the exact cause, but it was a bug anyway, could be an underlying dependency