drupal_set_message($this->t('You must have at least one <a href=":url">image styles</a> defined that uses a focal point effect in order to preview.', array(':url' => '/admin/config/media/image-styles')), 'warning');
This should use the URL class to generate URLs, and ideally generate it from the route name rather than the path.
Currently, this URL is broken if Drupal is running in a subfolder.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 2144115-5.patch | 1.23 KB | rajeshwari10 |
| #2 | incorrectly_formed_url-2808659-2.patch | 1.23 KB | bleen |
Comments
Comment #2
bleen commentedThis should do it
Comment #3
idebr commented$image_styles_url = Url::fromRoute('entity.image_style.collection');will have to be called with ->toString() first. This matches the documentation at #2571689: New :variable placeholder for URLs in HTML attributes added to SafeMarkup::format() and t()Comment #4
rajeshwari10 commentedComment #5
rajeshwari10 commentedHi,
I have made the changes as per said in #3. Please Review the patch.
Thanks.
Comment #7
bleen commentedCommitted (and fixed a tiny grammatical error that some idiot (read: me) introduced ....