You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tentatively filing this as a bug... it could be argued it’s a feature request too, I think it’s somewhere in between.
I’m working on a module that’ll allow very basic “rich text editing” for titles (i.e. Markdown-based instead of TinyMCE). Part of that is using a custom DBField type for storing the title and controlling how it’s rendered. I can control how it’s rendered everywhere inside and outside of the CMS, except the GridField breadcrumb:
This is because it accesses the property directly, which means it falls back to using the default casting (which is DBText):
I’d like to propose changing this to $this->record->obj('Title') instead, so that if the database type for Title is changed to something other than DBVarchar, it uses the correct casting instead of always using DBText::forTemplate().
How to reproduce
Override title field type for an item that can be edited in a GridField (e.g. I’m using non-inline-editable elements):
Module version(s) affected
5.0.0+
Description
Tentatively filing this as a bug... it could be argued it’s a feature request too, I think it’s somewhere in between.
I’m working on a module that’ll allow very basic “rich text editing” for titles (i.e. Markdown-based instead of TinyMCE). Part of that is using a custom
DBField
type for storing the title and controlling how it’s rendered. I can control how it’s rendered everywhere inside and outside of the CMS, except the GridField breadcrumb:This is because it accesses the property directly, which means it falls back to using the default casting (which is
DBText
):silverstripe-framework/src/Forms/GridField/GridFieldDetailForm_ItemRequest.php
Line 919 in 5ab9ded
I’d like to propose changing this to
$this->record->obj('Title')
instead, so that if the database type forTitle
is changed to something other thanDBVarchar
, it uses the correct casting instead of always usingDBText::forTemplate()
.How to reproduce
Override title field type for an item that can be edited in a GridField (e.g. I’m using non-inline-editable elements):
'TEST' should appear in the GridField breadcrumb, but doesn't.
Possible Solution
No response
Additional Context
No response
Validations
silverstripe/installer
(with any code examples you've provided)PRs
The text was updated successfully, but these errors were encountered: