Chris
Chris

Reputation: 8432

Sitecore download media button injecting surplus HTML markup

Context

Problem

See screen shot below. When I click "Download", the file is download but has appended to the content 3 html meta tags. *FILE CONTENTS* is a place holder for this example, but could be any content (text, image binary, etc).

*FILE CONTENTS*<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,300italic,400italic,600italic,700italic,300,600,700,800" rel="stylesheet" />

<link href="/sitecore/shell/themes/standard/default/Default.css" rel="stylesheet" />

<link href="/sitecore/shell/controls/Lib/Flexie/flex.css" rel="stylesheet" />

However, when I click "View file" the file button in the sitecore media control, the file is opened up as a raw file in the browser, and the 3 html meta tags are not present, the file displays as expected.

Further, pressing download on any media item directly in Sitecore CMS has the same problem.

For some further information, string searching for flex.css led us to this file - sitecore\shell\Controls\Error.htm.

However the contents of this file (trimmed just to show link tags is)

...
<link href="/sitecore/shell/Themes/Standard/Default/Default.css" type="text/css" rel="stylesheet" />
<link href="/sitecore/shell/Themes/Standard/Default/Dialogs.css" type="text/css" rel="stylesheet" />
<link href="/sitecore/shell/Controls/Lib/Flexie/flex.css" type="text/css" rel="stylesheet" />
...

You'll notice that Dialogs.css is not present in our issue, so I don't think it's this file. But including this information in case it helps others thought process in what might be causing this.

Question

Has anybody had this before and knows why this is happening?

Screenshots

The Sitecore control displayed for the File field.

Upvotes: 0

Views: 362

Answers (2)

Nikolay Mitikov
Nikolay Mitikov

Reputation: 533

Although patching approach cannot compete with using latest platform versions 7.2 - 8.2 patch is here & 8.2 Initial - Update 2 patch is here.

We invest tons of efforts into making the upgrade process easy & making each version better.

Why not spend the time on upgrading instead of tackling bugs in legacy software versions?

Upvotes: 0

user5113164
user5113164

Reputation:

Sitecore has released a patch for that please apply that patch to fix this issue. You can find all information @ https://github.com/SitecoreSupport/Sitecore.Support.90534/releases/

Upvotes: 1

Related Questions