Search code examples
undefineddocpad

Docpad error 'length' of undefined


My config

After "docpad run" produces errors

What could be the problem?

I tried to remove "docpad-paged", but don't result.


Solution

  • I see that getPageUrl is complaining that there is not a post for the Id -1 here

    You need to change this line to

    <% for pageNumber in [0..@document.page.count-1] by 1: %>
    

    the change here is by 1 as it will prevent coffee-script automatically going from 0 to -1 when there are no pages to loop.