-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
| return Str::limit(trim($messageId, $separator), 250); |
is ported from
wn-translate-plugin/models/Message.php
Line 309 in 7fa0de3
| return Str::limit(trim($messageId, $separator), 250); |
but it will trown an error in case of MySQL default config with
varcharmax = 191 (see https://github.com/wintercms/winter/blob/ec46549b21893d39c15261aa237e49c9c0680fbb/config/database.php#L70)
I think we need to get limit value using the same logic used here:
https://github.com/wintercms/winter/blob/ec46549b21893d39c15261aa237e49c9c0680fbb/modules/system/ServiceProvider.php#L624-L642
of even better, we can check the current table schema with Schema::getConnection()->getDoctrineColumn(self::TABLE_NAME, 'code')->getLength(), but this should be tested against all supported databases to check returned values (I don't have this kind of expertise).
Metadata
Metadata
Assignees
Labels
No labels