Website Development Company in Singapore
⟵ Resources

Sitecore 9.2 – “Value cannot be null – Parameter name: html” when inserting an external link into the text field through experience editor

CMS for sitecore_cover

After upgrading Sitecore XM from version 8.2 Update 6 (aka 8.2.6) to version 9.2 Initial Release (aka 9.2.0), the editors/authors keep reporting that there is an error message “Value cannot be null – Parameter name: html” when inserting an external link for rich text through Sitecore experience editor. This problem is very annoying and then users get a bad experience with the Sitecore platform so we should fix it as soon as possible.

We can replicate it easily with a fresh Sitecore 9.2.0 instance:

  • log into Sitecore and then access /sitecore/content/Home then switch to Experience Editor
  • A screenshot of a computer Description automatically generated
  • select Text field and then click on “Insert an external link into the text field” button
  • A screenshot of a computer Description automatically generated

As usual, we ask our best friend Google and then she supposes that it should be a Sitecore bug #371707 https://community.sitecore.com/community?id=community_question&sys_id=9c356b291b4770d0b8954371b24bcbdd

The workaround in this article is working well but we prefer the Sitecore patch if any. We should create a support ticket through Sitecore Support Portal. Unfortunately, there is no Sitecore patch for this issue but Sitecore technical support team proposes a workaround by simply inserting the following script (right after line 525) into the file \sitecore\shell\Applications\Page Modes\ChromeTypes\FieldChromeType.js

//fix 371707

(message === "webedit:insertexternallink" ? ',selection=' + this.getSelectedHtml() : "") +

//end of fix

A screenshot of a computer Description automatically generated

Note 1: you can download the above updated file.

Note 2: this issue is fixed in the Sitecore version 9.3.0 and later

After editing and deploying the updated file, the problem is solved on all environments

A screenshot of a computer Description automatically generated

Happy Sitecore Workaround!

This article originally appeared on Walking on clouds (https://buoctrenmay.com/).

 

Playing around with Sitecore 10 docker containers and my simple development framework version 3.0

How to restart Sitecore server via Sitecore user interface

Playing around with Sitecore 10.0.1 docker containers and my simple development framework version 3.1

Portfolios

Resources

Contact Us

Website Development Company in Singapore white logo
LowCarbonSG Logo
Terms & Conditions | Privacy Policy | Accessibility Statement

Apply Now!

Upload Resume (with a 2mb maximum file size)
Accepted file types: doc, docx, pdf, xps, Max. file size: 2 MB.
This field is for validation purposes and should be left unchanged.