Disable Filename Truncation does not work when field is required
gingebaker opened this issue · comments
gingebaker commented
Hi
Found one issue with the FileFieldTweak "Disable Filename Truncation"
If the file field for example is required it will not add the noShortName = 1. This is because you are using the $event->object->class for checking. This variable will have the value "FieldtypeFile required", wich will not pass the if statement.
You could change the if statement here:
https://github.com/rolandtoth/AdminOnSteroids/blob/master/AdminOnSteroids.module#L1384
to:
if ($event->object instanceof FieldtypeFile) {
return;
}
Thx for this great module!
Roland Toth Pal commented
This is a much better check, thanks! Will be included in the next update.