Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.8.8, 3.9.2
-
None
Description
The content/view/ezimage.tpl template may output link tag (<a> </a>) around its main <img /> tag. In case the image file is missing, the <img /> nor </a> tags are not being output at all, yet, the opening <a> tag is being output.
This breaks (X)HTML compliance and causes ugly artifacts in some mainstream browsers.
This is caused by opening tag being output outside of the main
{section show=...} which decided whether <img /> and closing </a> will be output.Attached patch fixes it by moving relevant lines into that {section show=...}
area.
Steps to reproduce
- use content/view/ezimage.tpl template with link (pass a href attribute)
- display page, the link is being output correctly
- remove image file and its thumbnails (aliases) from server from storage/ folder
- display page again, only the opening tag of <a> is being output.