I've been getting an "Unable to render media from site:name. Error: No file id" message when editing content.

The issue is how Media attempts to replace tokens with markup. It is specifically looking for double brackets. This causes a conflict with modules like Token Filter and the common Drupal practice of modules including in the subject line the site name in brackets (see: [[site:name]]).

The way to fix this is check if the string is a real token before running it through media_wysiwyg. The attached patch fixes the problem. Please review, thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ron_s created an issue. See original summary.

joseph.olstad’s picture

Thanks for the patch, triggering tests.

joseph.olstad’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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