Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting unknown property: craft\awss3\Volume::storageClass on dev-craft-3.1 #40

Closed
acehead opened this issue Feb 1, 2019 · 13 comments
Closed

Comments

@acehead
Copy link

acehead commented Feb 1, 2019

Using Craft 3.1.7, project config enabled and dev-craft-3.1 version of plugin following error occurs when accessing Control panel:
Setting unknown property: craft\awss3\Volume::storageClass

@andris-sevcenko
Copy link
Contributor

Can you try updating to the just-released 1.1. version of the plugin?

@acehead
Copy link
Author

acehead commented Feb 1, 2019

Just updated, same issue persists, it seems that https://github.com/craftcms/aws-s3/blob/1.1.0/src/Volume.php is still missing storageClass property

@andris-sevcenko
Copy link
Contributor

Right, because it should have been removed by https://github.com/craftcms/aws-s3/blob/master/src/migrations/m180929_165000_remove_storageclass_setting.php

Can you check if your craft_migrations table has that migration entry? If it does, what date does it have?

@acehead
Copy link
Author

acehead commented Feb 1, 2019

Just checked, no such entry there. Craft says that there are migrations pending, but right after hitting the finish button I get the abovementioned error.

@andris-sevcenko
Copy link
Contributor

Can you get a stack trace for that error from the log files?

@acehead
Copy link
Author

acehead commented Feb 1, 2019

stacktrace.txt

@andris-sevcenko
Copy link
Contributor

/var/www/config/twig-webpack-extension.php seems to be calling craft\services\Globals->getSetByHandle('common').

I'm not sure that calling Craft functionality from config files is a good idea, as demonstrated by this particular issue. You're invoking Craft before it has a chance to run its migrations and this can lead to unpredictable results. Can you disable that, let the migrations run and see what happens?

@acehead
Copy link
Author

acehead commented Feb 1, 2019

You're absolutely right, but this was the only way we could make that happen without changing original plugin code.
Commented it out, unfortunately problem is still there, see stacktrace
stacktrace2.txt

@andris-sevcenko
Copy link
Contributor

Ugh. This is not cool.

Okay. Here's the plan. Re-adding this property (since it does nothing), cutting a 1.1.1 release and for the next release require at least 1.1.1 to update and delete that property. That should ensure that everyone updates to 1.1.1, run the migration to get rid of the setting and the property is safe to be removed in the next version.

@acehead
Copy link
Author

acehead commented Feb 1, 2019

sounds great, waiting for 1.1.1 to be released

@andris-sevcenko
Copy link
Contributor

Should be released as of now.

@acehead
Copy link
Author

acehead commented Feb 1, 2019

Great, worked like a charm, migration was done successfully as well. Thanks for your help!

@andris-sevcenko
Copy link
Contributor

I must say, for an instant I was scared when I saw your email :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants