Which javascript file does the "Site Code" go in?

EDIT: To ask a simpler question … which javascript file does the site code go in?

I am using Google Chrome, and normally the “Page” code for my site appears when I go Developer Console > Open File > c1dmp.js,

however I moved the code to the “Site” panel, and that code does not appear in c1dmp.js.

I don’t see any other files listed on the Wix Developer Console when I preview my site … well, only masterPage.js, and that doesn’t contain the code either.

How can I debug “site” code ??

1 Like

This is urgent … I can’t continue development without an answer to this. Wix staff … please?

In Developer Console is says
“Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.”

I open masterPage.js, and all it contains is:

define([
‘lodash’,
‘core’,
‘santaProps’,
‘react’
], function (_, core, santaProps, React) {
‘use strict’;

const masterPage = { 
    displayName: 'WixMasterPage', 
    propTypes: { 
        componentViewMode: santaProps.Types.RenderFlags.componentViewMode.isRequired, // hack to get page behaviors to re-register when switching to preview 
        compBehaviors: santaProps.Types.Component.compBehaviors, // required for page behaviors 
        style: santaProps.Types.Component.style.isRequired 
    }, 
    render() { 
        return React.createElement('div', this.props, this.props.children); 
    } 
}; 

core.compRegistrar.register('mobile.core.components.MasterPage', masterPage, true); 

return masterPage; 

});

masterPage.js is correct. Note that you might have 2 files with that name on your site. The one you should be looking for is located under pages/public/pages/masterPage.js.

Thank you so much! :smiley:

I got similar issue, please help…
here is message i m getting:
Loading the code for the site. To debug this code, open masterPage.js in Developer Tools.There was an error in your scriptTypeError: n is not a function