Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Docpad 4 Not Finding Layouts #172

Closed
msutherl opened this Issue · 3 comments

2 participants

@msutherl

I just upgaded to Docpad 4 and tried to render my site. All of the files are rendered as if there are no layouts. docpad generate doesn't throw any errors and I couldn't find anything outstanding by using the debug flag, but trying to render a single file with docpad render resulted in this error:

ESC[1mESC[31merror:ESC[39m An error occured: Could not find the layout: undefined Error: Could not find the layout: un
defined                                                                                                               
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:383:17                                               
    at _Class.findOne (/usr/local/lib/node_modules/docpad/node_modules/query-engine/lib/query-engine.coffee:267:16)   
    at DocumentModel.getLayout (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:377:20)                     
    at DocumentModel.getEve (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:394:21)                        
    at DocumentModel.contextualize (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:357:12)                 
    at /usr/local/lib/node_modules/docpad/lib/docpad.coffee:603:27                                                    
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:144:45                                               
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:175:49                                               
    at DocumentModel.normalize (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:351:39)                     
    at _Class.next (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:172:24)ESC[22m                          

My layouts are in src/layouts and are written in CoffeeKup. This error came from a file the references the layout default.html.coffee. The header looks like so:

---
title: 'Name'
layout: 'default'
type: 'Type'
year: '2012'
---

Any idea what's up? Rolling back to v3 now.

@balupton
Owner

Fixed in the just released v4.1.1. Thanks :)

@balupton balupton closed this
@msutherl

I was unable to render with 5.2.5, so I tried 4.1.1 again (after submitting this bug, I had rolled back to a v3 release) and got a similar error:

ESC[1mESC[33mnotice:ESC[39m We're preparing your plugins, this may take a while the first time. Wait
ing on the plugins: eco, feedr, jade, less, related, stylusESC[22m                                  
ESC[1mESC[33mnotice:ESC[39m There is a new version of docpad available, you should probably upgrade.
..                                                                                                  
current version:  4.1.1                                                                             
new version:      5.2.5                                                                             
grab it here:     https://github.com/bevry/docpadESC[22m                                            
ESC[1mESC[31merror:ESC[39m An error occured: Could not find the layout: default Error: Could not fin
d the layout: default                                                                               
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:429:17                             
    at _Class.findOne (/usr/local/lib/node_modules/docpad/node_modules/query-engine/lib/query-engine
.coffee:328:16)                                                                                     
    at DocumentModel.getLayout (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:423:20)   
    at DocumentModel.getEve (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:440:21)      
    at DocumentModel.contextualize (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:401:12
)                                                                                                   
    at /usr/local/lib/node_modules/docpad/lib/docpad.coffee:692:27                                  
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:150:45                             
    at /usr/local/lib/node_modules/docpad/lib/models/file.coffee:187:49                             
    at DocumentModel.normalize (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:394:9)    
    at _Class.next (/usr/local/lib/node_modules/docpad/lib/models/file.coffee:182:24)ESC[22m        
@balupton
Owner

Can you give me access to the repo in question, and I'll see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.