Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docpad 4 Not Finding Layouts #172

Closed
flowerornament opened this issue Apr 7, 2012 · 3 comments
Closed

Docpad 4 Not Finding Layouts #172

flowerornament opened this issue Apr 7, 2012 · 3 comments

Comments

@flowerornament
Copy link

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
Copy link
Member

balupton commented Apr 9, 2012

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

@balupton balupton closed this as completed Apr 9, 2012
@flowerornament
Copy link
Author

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
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants