I want to open the visualforce community in lightning community(in same window or in new window).

I am getting

Blocked opening '' in a new window because the request was made in a sandboxed frame whose 'allow-popups' permission is not set

error when I click on 'Go To Classis community' button.

please check the following code.

component code:

<aura:component implements="forceCommunity:availableForAllPageTypes,force:appHostable,force:hasRecordId,flexipage:availableForAllPageTypes" access="global" >
    <aura:dependency resource="markup://force:navigateToURL" type="EVENT"/>
    <aura:attribute name="classicCommURL" type="String" default="https://cpoc-fcaconnect.cs89.force.com/firms"/>
    <p> Lightning Community</p>
    <ui:button label="Go To Classis community" press="{!c.goToClassicConnect}" /><br/><br/><br/>
    <ui:outputURL value="{!v.classicCommURL}" label="Classic community" target="_new"/>

Component controller code:

    goToClassicConnect : function(component, event, helper) {
        var urlEvent = $A.get("e.force:navigateToURL");
            "url": 'https://cpoc-fcaconnect.cs89.force.com/firms' 

and if I click on 'classic community' link, the classic community page does not open, but If I press ctrl+click on 'classic community' link then it open in new tab.

this is how I tried in two ways, but nothing is working

  • I am also facing the same issue. Not sure what to do.. Please let me know if you have found any solutions – Sagar Hinsu Jan 4 '19 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.