When creating a search index of the file type, after searching on the search page you get an error because $url is not an array but just the file.

please review this tiny patch that fixes this.

Greets

Tim

CommentFileSizeAuthor
#1 patch2.txt943 bytesAnonymous (not verified)
patch.txt878 bytesAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

FileSize
943 bytes

Sorry,

committed patch to soon, the uri for the file also needs to be converted so this would be a better option:

Greets

Tim

drunken monkey’s picture

Ah, didn't notice this before, but this seems to be an annoying core bug — see #1057242: entity_uri() should not use $entity->uri (was $file->uri doesn't match the contract for uri callbacks).
Your patch looks like a good workaround, I'll probably commit it soon. Thanks!

drunken monkey’s picture

Title: File search index error » Problem with entity_uri('file')
Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.