I recently upgraded WordPress from 4.3 version to 5.0.3 version.
Now I am trying to add following code in to a page of a WordPress site in the Gutenberg editor.
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
hbspt.forms.create({
portalId: "xyz",
formId: "abc",
sfdcCampaignId: "pqr"
});
</script>
I get following error in the console
/wp-json/wp/v2/pages/4713/autosaves?_locale=user 500 (Internal Server Error)
I have tried following to fix it.
- Updated and saved permalinks : did not work
- Checked WordPress logs : no error messages, only some notices
- No specific errors in the error logs
As of now I have installed classic editor plugin and it allow to save this script.
How to fix this issue with Block editor
js.hsforms.net
? Is it related to a WordPress plugin?