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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Reg created an issue. See original summary.

Reg’s picture

Reg’s picture

I forgot to remove other changes from the file, this one should work.

Reg’s picture

Title: DBlog can fail on multibyte llinks » DBlog can fail on multibyte links
Reg’s picture

Status: Active » Needs review
FileSize
669 bytes

So 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.

Status: Needs review » Needs work

The last submitted patch, 5: dblog-multibyte-link-error-2934298-3-D7.patch, failed testing. View results

Reg’s picture

Status: Needs work » Closed (outdated)

I think I had an out of date core, I'm closing this issue.