• Debbie Engelmeyer
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I've been seeing an error pushing our project source to a fresh scratch org that started this week.  I wasn't seeing it on my machine (although my colleage was) until I purged my git repository.  Now I can't get past it.

My sfdx-project.json file has multiple projects, but none of them re-use directories, and none of them re-define the object with the error.  Also, I added "pushPackageDirectoriesSequentially": true to the file in an attempt to get past this error.

I also tried changing sfdx versions, changing the sourceApiVersion, and removing all but the main project from the file.  No go.
I've been seeing an error pushing our project source to a fresh scratch org that started this week.  I wasn't seeing it on my machine (although my colleage was) until I purged my git repository.  Now I can't get past it.

My sfdx-project.json file has multiple projects, but none of them re-use directories, and none of them re-define the object with the error.  Also, I added "pushPackageDirectoriesSequentially": true to the file in an attempt to get past this error.

I also tried changing sfdx versions, changing the sourceApiVersion, and removing all but the main project from the file.  No go.
I have written a Lightning Component of Modal Popup to show popup in home page of public community website , it will be shown whenever user visits the website. 

My requirement is here is popup window should show only once when the user visits the website for the first time.
But the issue is , whenever the user visits to the website or other sub pages of the site and come back to the home page, again the popup appears. 
In this we want to set the modal popup should be shown only for the first time when the users visit the site , 
as in the popup we are just making sure the user is aware of Privacy policy .
Once, the user clicks on OK, everytime the Privacy policy popup should not get open when the user visits the site and home page.

code
popup.cmp

<aura:component implements="flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global" >
    <aura:handler  name="init" value="{!this}" action="{!c.showInfoToast}"/>   
    <div>
        <lightning:button 
                          variant="brand"
                          onclick="{!c.showInfoToast}"
                          >
        </lightning:button>
        
    </div>
</aura:component>

popupcontroller.js

({
    
   
    showInfoToast : function(component, event, helper) {
        var toastEvent = $A.get("e.force:showToast");
        toastEvent.setParams({
            title : 'Info ',
            
            messageTemplate: 'This website use cookies. For details see  {1} ',
            messageTemplateData: ['Salesforce', {
                url: 'www.privacypolicy.com'',
                label: 'Privacy Policy',
            }],
            duration:' 5000',
            key: 'info_alt',
            type: 'info',
            mode: 'sticky'
        });
        toastEvent.fire();
    },
    
    doInit: function(component, event, helper) { 
 var temperorySession = localStorage.getItem('tempSession');
  if(temperorySession == '1')
        {  
      console.log('===== in If');
            component.set("v.isModalOpen", false);
  }
        else
        {
      console.log('===== in else');
      component.set("v.isModalOpen", true);
  }
   localStorage.setItem('tempSession', '1');
 }
    
    
})