1

I have the following errors when ever I navigate to my VisualForce page. I'm wondering if it's indicative of me doing something wrong in my code?

enter image description here

I'm loading a simple constructer in my controller, could this affect the default SF scripts?

public void SessionRegistration () {


    If(ApexPages.currentPage().getParameters().get('id') != null) 
    {

        //Get the session
        newYas = [SELECT ID, Session__c, Name FROM Youth_Academy_Session__c WHERE ID =: ApexPages.currentPage().getParameters().get('id')];

        // If there is an ID do not show the create session panel
        showCreateSession = false;


    }
    else
    {
        // If No ID show createSession panel
        showCreateSession = true; 

        // Load 10 previous sessions
        previousSessionList = [SELECT Name From Youth_Academy_Session__c LIMIT 10];

    }

I don't understand why these errors don't show up in my other Visualforce pages, but this one has a whole slew of them. I have full permissions to access the page with my profile, and I am going through a custom visualforce tab.

Edit

The following script seems to be the issue, this is automatically inserted into my visualforce page after compilation:

enter image description here

Does anybody have any ideas?

7
  • Can you update your browser and try or else check with any other browser.
    – Reshma
    Feb 22, 2017 at 9:31
  • @Reshma I am on the latest version of Chrome Version 56.0.2924.87 (64-bit) however I also receive the errors in Firefox (except the reflected-xss warning)
    – user24634
    Feb 22, 2017 at 9:39
  • try commenting few lines until error is gone
    – Raul
    Feb 22, 2017 at 9:42
  • Suggest you create a blank Visualforce page with no controller and confirm the errors are still reported. If they are, then it is the platform that is causing the errors and you can ignore them or report them to Salesforce via a support request.
    – Keith C
    Feb 22, 2017 at 9:54
  • I have seen similar issues this morning. Probably, those caused Salesforce Navigator to stop working
    – kurunve
    Feb 22, 2017 at 9:56

1 Answer 1

0

These errors are appearing because Chrome has removed the two CSP directives 'referrer' and 'reflected-xss' in versions 56 and newer.

https://www.chromestatus.com/feature/5680800376815616

https://www.chromestatus.com/feature/5769374145183744

It's not necessarily anything wrong with your code. Salesforce is working on a patch fix on our side and I'll update this answer when it goes live.

Update: This should have been released with Spring '17 patch 11. You can check your instance's version at a URL like this https://status.salesforce.com/status/NA2

You must log in to answer this question.