-
-
Notifications
You must be signed in to change notification settings - Fork 810
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
[Bug] Change of FieldType->getStorageType() crashes custom field types #6413
Comments
Thanks! |
Yep, changed in this commit 6bb1e17 on 26 May 2015 … about 2 years ago |
Then i must have missed something. Fact is, that until 3.3 you could (and should according to documentation) return a string in your custom field's At least that's where my debugging analysis ended. And since the base classes method returns a Doctrine type class and all current extensions override that method and return a string instead, the cause seemed clear to me. Did i miss something? This is were the error happens:
And this is the message:
Line 123 is the line with |
Yeah, totally my bad … I was reading the code & issue in the airport and then saw Ross' comments in Slack hours later. I think he's got it under control 👍 |
Everything is fine. Glad to see it fixed or cleared up. ;) |
There has been a change in the getStorageType() method of the FieldType class. in Bolt 3.3-beta2
The new
FieldTypeBase->getStorageType()
method converts the string name of a field's type to it’s Doctrine class. If you override this method (like the docs say and all current extensions do) to return a string, this will crash as we need a Doctrine type class and not a string.The old style as shown in the documentation shows that a custom field type should have a method like this:
The new FieldTypeBase however expects that method to do the necessary conversion, which our override clearly does not. (The internal types already have a changed method like shown here)
This means, all current extensions need to change their
getStorageType()
method. If not, you will get an error message (not cought by bolt's logging. I had to add aini_set("display_errors", 1)
in my app.php:This is most probably a bug as it would hurt BC a bit to much, right?
Details
The text was updated successfully, but these errors were encountered: