Iframe error, can't edit page

I have the weirdest issue on a page that I inherited. the problem is that if i access the page from within cornerstone, it just doesn’t open and throw and error. however if i go to the front-end and try to edit the same page it has bigger chances of showing normally.

Hello @franticape,

Thanks for writing to us.

I checked your site on my end, and it is working fine. I tested it in Google Chrome version 149.0.7827.201. The issue may be related to the browser cache. I would suggest clearing your browser cache and checking it again. I would also suggest resetting the permalink structure to Plain and then changing it back to Post Name.

Thanks

This happens on my client’s side as well who never even accessed the site before so I doubt it’s cache. it’s happening randomly as I mentioned and it started happening when I added the cornerstone form to the page or a component element. not really sure why. is there any way I can debug this?

the best way to recreate this btw, is to access the “consultorias” page from cornerstone, maybe open another page from cornerstone directly and then try to access this.

Another thing that is important to mention is that i have over 20 websites with pro and cornerstone and this is the only one with a problem. I just don’t know how to debug this, to understand exactly what is it that is creating this error.

Hello @franticape,

I tried to access your site dashboard, but it seems that the server is down at the moment, so I cannot access the website. Please let us know when it is accessible so we can recheck it.

Thanks

Th site never appeared to be down on my end. could you please check again?

By the way I can confirm the problem on the consultorias page is the component inside the grid. it has a form in it, not sure what is it with that element but if i remove it and click “retry”, it works normally.

the component is nothing but a cornerstone forms page , a preset.

Hello @franticape,

The issue is coming from the Form.

  • Kindly remove the Form component from the page first.
  • Insert the form directly into the page.
  • Once the form is working, copy the Form as a component.
  • Re-insert your component into the page.

Best Regards.

Is it possible to know what exactly happened? in the end i removed the component and added the form there directly and that seemed to do the trick but… that’s not ideal. it’s ok at the moment because the site is quite small but as soon as i add the form into a component, it starts breaking again.

Hey @franticape,

When you wrap a Cornerstone Form (or its input fields) inside a Cornerstone Component (or Global Block), it breaks because of how the form registers its input fields:

  1. Context & Scoping: When a form renders, it traverses its own child elements (_modules) using the function cs_form_get_inputs_from_form_element(). It does this to register all the input names and validation rules.
  2. Component Isolation: Cornerstone Components are stored as separate entities/posts and dynamically resolved at render time. They act as boundaries. Because of this, the fields inside the Component are not directly nested within the Form’s immediate _modules tree when the plugin looks for them.
  3. Registration Failure: Since the plugin cannot traverse past the Component boundary to see the input elements inside it, the form fails to register the input fields. When the form is submitted, it does not recognize any submitted data or validations for those fields, causing the form to break.

With all that said, you can try the following solutions but it’s best to have the form directly in the page.

Viewed boot.php:1-135
Listed directory Data
Viewed Data.php:1-266

Yes, there are a few ways to resolve or work around this limitation depending on your workflow:

Solution 1: Make sure to put the ENTIRE Form inside the Component (Not just the inputs)

If you place a Form wrapper element on the page and save only the input fields inside a Component, the Form element cannot traverse past the Component boundary to find its children.

  • Do: Create a Component that contains the entire Form element along with all of its input fields. As long as the Form element is the parent element inside the Component, it can successfully scan and register its inputs locally.

Solution 2: Explicitly Set a Custom Form ID

When you save elements as Components, Cornerstone may dynamically generate or change element IDs (like e1234-5) upon rendering, causing submissions to fail due to ID mismatches.

  • Do: Select your Form element, go to its settings (in the Form tab), and enter a static, unique string in the ID field (e.g. contact-form-footer). This prevents Cornerstone from generating a random dynamic ID for each instance.