Skip to content

TypeError: Cannot read property 'links' of null #167

Description

I think I had this issue in the past once. Hard to know what's causing it. I have 3 navigation areas in Squarespace, one of which is all folders and external links, another of which is ALL external links. I wonder if that could be an issue?

Here's the error:

> sqs-log Get local cache for key => page-homepage.html
/usr/local/lib/node_modules/node-squarespace-server/squarespace-template.js:1120
    var navContext = getNavigationContextItems( navigation, (pageLinks || navigation.links), pageJson ),
                                                                                    ^

TypeError: Cannot read property 'links' of null
    at getNavigationContext (/usr/local/lib/node_modules/node-squarespace-server/squarespace-template.js:1120:85)
    at replaceNavigations (/usr/local/lib/node_modules/node-squarespace-server/squarespace-template.js:1006:23)
    at Object.renderTemplate (/usr/local/lib/node_modules/node-squarespace-server/squarespace-template.js:516:16)
    at /usr/local/lib/node_modules/node-squarespace-server/squarespace-server.js:272:29
    at /usr/local/lib/node_modules/node-squarespace-server/node_modules/node-squarespace-middleware/squarespace-middleware.js:376:13
    at Request._callback (/usr/local/lib/node_modules/node-squarespace-server/node_modules/node-squarespace-middleware/squarespace-middleware.js:300:9)
    at Request.self.callback (/usr/local/lib/node_modules/node-squarespace-server/node_modules/request/request.js:199:22)
    at emitTwo (events.js:100:13)
    at Request.emit (events.js:185:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/node-squarespace-server/node_modules/request/request.js:1036:10)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions