Problem/Motivation

Error: Call to undefined function Drupal\soundcloudfield\Plugin\Field\FieldFormatter\url() in Drupal\soundcloudfield\Plugin\Field\FieldFormatter\SoundCloudDefaultFormatter->viewElements() (line 283 of modules/contrib/soundcloudfield/src/Plugin/Field/FieldFormatter/SoundCloudDefaultFormatter.php).

Steps to reproduce

Drupal 8 + url function is depreciated see https://www.drupal.org/node/2346779

  • Using the soundcloud field
  • Set the display format Default PHP-based
  • view the node

Proposed resolution

Update the function call to use the new method ie Url::fromUri

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gavin.hughes created an issue. See original summary.

akoepke’s picture

Status: Active » Fixed

Thanks for the change, forgot to modify that line when moving changes between versions of the module.

I also fixed up my array syntax on that same line, should have been using the short syntax.

Status: Fixed » Closed (fixed)

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