Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I noticed that the $link in DrupalWebTestCase:generateLogEntries() was being rejected by the DB. After some tracing around I found it was this line:
'link' => substr($log_entry['link'], 0, 255),
in dblog_watchdog() that was the cause because it was cutting a multibyte character in two. By changing the line to the following:
'link' => mb_strimwidth($log_entry['link'], 0, 255),
the problem was resolved. I discovered this working on issue https://www.drupal.org/project/drupal/issues/1158322.
I'll attach a patch next.
Comment | File | Size | Author |
---|---|---|---|
#5 | dblog-multibyte-link-error-2934298-3-D7.patch | 669 bytes | Reg |
| |||
#3 | dblog-multibyte-link-error-2934298-2-D7.patch | 947 bytes | Reg |
Comments
Comment #2
Reg CreditAttribution: Reg as a volunteer commentedComment #3
Reg CreditAttribution: Reg as a volunteer commentedI forgot to remove other changes from the file, this one should work.
Comment #4
Reg CreditAttribution: Reg as a volunteer commentedComment #5
Reg CreditAttribution: Reg as a volunteer commentedSo it came to my attention that Drupal doesn't assume that there are multibyte functions installed on a system. This patch takes that into account.
Comment #7
Reg CreditAttribution: Reg as a volunteer commentedI think I had an out of date core, I'm closing this issue.