Hubspot form disappearing

Hi @MCuzmaCépeda
I’m seeing differences between the form creation code inserted into your site via the HubSpot WordPress plugin compared to a fresh install I did on a test site. Here’s what my test code looks like:

			<!-- DO NOT COPY THIS SNIPPET! Start of Page Analytics Tracking for HubSpot WordPress plugin v8.0.227-->
			<script type="text/javascript">
				var _hsq = _hsq || [];
				_hsq.push(["setContentType", "standard-page"]);
			</script>
			<!-- DO NOT COPY THIS SNIPPET! End of Page Analytics Tracking for HubSpot WordPress plugin -->
						<script>
				(function() {
					var hbspt = window.hbspt = window.hbspt || {};
					hbspt.forms = hbspt.forms || {};
					hbspt._wpFormsQueue = [];
					hbspt.enqueueForm = function(formDef) {
						if (hbspt.forms && hbspt.forms.create) {
							hbspt.forms.create(formDef);
						} else {
							hbspt._wpFormsQueue.push(formDef);
						}
					}
					if (!window.hbspt.forms.create) {
						Object.defineProperty(window.hbspt.forms, 'create', {
							configurable: true,
							get: function() {
								return hbspt._wpCreateForm;
							},
							set: function(value) {
								hbspt._wpCreateForm = value;
								while (hbspt._wpFormsQueue.length) {
									var formDef = hbspt._wpFormsQueue.shift();
									if (!document.currentScript) {
										var formScriptId = 'leadin-forms-v2-js';
										hubspot.utils.currentScript = document.getElementById(formScriptId);
									}
									hbspt._wpCreateForm.call(hbspt.forms, formDef);
								}
							},
						});
					}
				})();
			</script>

Your form script code looks like this

 <script type="text/javascript">var _hsq=_hsq||[];_hsq.push(["setContentType","standard-page"])</script> <script>(function(){var hbspt=window.hbspt=window.hbspt||{};hbspt.forms=hbspt.forms||{};hbspt._wpFormsQueue=[];hbspt.enqueueForm=function(formDef){if(hbspt.forms&&hbspt.forms.create){hbspt.forms.create(formDef)}else{hbspt._wpFormsQueue.push(formDef)}}
if(!window.hbspt.forms.create){Object.defineProperty(window.hbspt.forms,'create',{configurable:!0,get:function(){return hbspt._wpCreateForm},set:function(value){hbspt._wpCreateForm=value;while(hbspt._wpFormsQueue.length){var formDef=hbspt._wpFormsQueue.shift();if(!document.currentScript){var formScriptId='leadin-forms-v2-js';hubspot.utils.currentScript=document.getElementById(formScriptId)}
hbspt._wpCreateForm.call(hbspt.forms,formDef)}},})}})()</script>

Running through the code I see some pieces of the code missing. If you have recently updated your HubSpot plugin, my next guess is that the WP-Optimize plugin is altering your code. If you can, I would suggest disabling HTML / Javascript minification and/or disabling the plugin to see if that is causing the issue (on a test site if possible). Also, on https://monikacuzmacepeda.com/netzwerktreffen, I don’t see the actual form embed code which would look something like this:

					<script>
						hbspt.enqueueForm({
							portalId: 12345678,
							formId: "a30ce37e-a1a6-4b29-a896-189ec1d23553",
							target: "#hbspt-form-1623230060000-1779843313",
							shortcode: "wp",

						});
					</script>
					<div class="hbspt-form" id="hbspt-form-1623230060000-1779843313"></div>

If you have embedded that code in this page then something must be stripping that out also. Again WP-Optimize could be the culprit, but if not, I would suggest checking for conflicting plugins. Recent updates to other plugins can sometimes cause conflicts and unexpected behaviour.