There is a leftover call to l() in SoundCloudDefaultFormatter.php:265, which does not exist in Drupal 8.

The same line also contains a bad ! placeholder. Markup placeholders can't be used in D8, and link elements need to be part of the translation string.

Comments

cburschka created an issue. See original summary.

cburschka’s picture

Title: rror: Call to undefined function Drupal\soundcloudfield\Plugin\Field\FieldFormatter\l() » Call to undefined function Drupal\soundcloudfield\Plugin\Field\FieldFormatter\l()
Issue summary: View changes
cburschka’s picture

Issue summary: View changes
pifagor’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

patch

cburschka’s picture

StatusFileSize
new842 bytes

This doesn't quite work, as far as I can tell:

Cannot use object of type Drupal\soundcloudfield\Plugin\Field\FieldType\SoundCloudItem as array in Drupal\soundcloudfield\Plugin\Field\FieldFormatter\SoundCloudDefaultFormatter->viewElements()

The correct way to access the url should be $item->url.

(The invalid !placeholder also doesn't work.)

  • cburschka authored 7648ca4 on 8.x-1.x
    Issue #2857050 by cburschka: Call to undefined function Drupal\...
attila.fekete’s picture

Status: Needs review » Fixed

@cburschka: thanks for the patch, @pifagor: your patch didn't work for me either

Status: Fixed » Closed (fixed)

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

pifagor’s picture

lakshmandrupal’s picture

#5 worked for me