Gravatar for jpdery@coveo.com

Question by jpdery, May 5, 2014 1:05 PM

Salesforce IFrame error opening result in custom page

Got this custom apex page, where I put nearly the same content as coveoSearchPage

( my search page has no controller, and lacks some items such as )

Now when I search for Matthew and click on result, I get Uncaught SecurityError: Sandbox access violation: Blocked a frame at "https://my.visual.force.com" from accessing a frame at "https://my.visual.force.com". The frame being accessed is sandboxed and lacks the "allow-same-origin" flag.

Gravatar for glaporte@coveo.com

Comment by Gregory Laporte, May 5, 2014 2:24 PM

Are you in the Salesforce Console or in a standard salesforce app?

Gravatar for jpdery@coveo.com

Comment by jpdery, May 5, 2014 2:32 PM

I was in Salesforce Console, click "setup" then from the list of recent pages items, clicked SAMPLEJsSearch visual force page (https://….cs15.visual.force.com/apex/SAMPLEJsSearch)

Funny, I cannot reproduce it now.

1 Reply
Gravatar for mlaporte@coveo.com

Answer by Martin Laporte, May 6, 2014 5:55 AM

Salesforce uses iframes for side panels, and some pages on some sites deny being rendered inside a frame, to prevent clickjacking attacks, etc.

When you say "clicked on Matthew", what was the intended "destination" ? Typically SF pages work fine when put inside an iframe within Salesforce.

Gravatar for jpdery@coveo.com

Comment by jpdery, May 6, 2014 11:36 AM

FYI: the intended destination was a SalesForce Contact object URL: https://my.salesforce.com/005i0000002XUChAAO

Gravatar for mlaporte@coveo.com

Comment by Martin Laporte, May 6, 2014 11:38 AM

And you are still unable to repro?

Gravatar for jpdery@coveo.com

Comment by jpdery, May 6, 2014 1:14 PM

correct, unable. I will accept your answer.

Ask a question