Duplicate field in many_many_extraFields
causing "ClassName" unknown field error
#11190
Open
2 tasks done
Labels
Module version(s) affected
4.11.15
Description
Posting as requested on Slack.
This issue is being raised to update the error message to make it clearer, not necessarily to fix the issue (which, from past tickets, I understand to be a bit of an undertaking).
My set up included 2 DOs
All of these use
SortableGridField
and have a "sort" field of some kind, either in the DO or as amany_many_extraField
with other DOs.I kept receiving the error message of
Unknown column 'SaleableProduct.ClassName' in 'field list'
, which is a field pre-populated by SS, but it turned out that having the same field name in the DO and in themany_many_extraFields
caused this error.In other words, if you have a field with the same name both in the
db
configuration and themany_many_extraFields
configuration, an error is generated which incorrectly points at the "ClassName" field.I'd like to propose a better error warning on this to help other users identify this issue more quickly. I believe this issue is still present in v5.
For reference:
https://silverstripe-users.slack.com/archives/C0QSDASKT/p1558424152053800?thread_ts=1558407507.048800&cid=C0QSDASKT
Similar issues reporting the same error: #2269 #9684
How to reproduce
Written from memory
Possible Solution
No response
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)The text was updated successfully, but these errors were encountered: