locomotivecms/engine — Issue #255: {% extends '/url' %} throws error "stack level too deep" when importing a site
Author: kikito
Created: 2011-12-17 17:06:43+00:00
State: open

Hi there,

I think the title pretty much explains itself. When I try to use {% extend %} with anything other than 'parent', I provoke a "stack level too deep" error.

The setup is simple: a page called "template" from which I want other pages to inherit. "template" itself is non-published, non-listed. Here's the site cfg in locomotive-editor:

site:
name: A test of extends 'url' + import
locale: en

pages:
- "index":
title: Inicio

- "template":
title: Template
published: false
listed: false

- "test":
title: The test page

- "404":
title: Not found

And here's my test "template" page:

Template error

{% block main %}

This is an extended page

{% endblock %}

This is how I try to use it in another page:

{% extends '/template' %}

{% block main %}

This is the test page

{% endblock %}

The log I see is just one line repeated over ~10k times:

...
MONGODB locomotive_dev['pages'].find({"site_id"=>BSON::ObjectId('4eeb4df512b36310dd000006'), :fullpath=>""})
MONGODB locomotive_dev['pages'].find({"site_id"=>BSON::ObjectId('4eeb4df512b36310dd000006'), :fullpath=>""})
...

I'm using locomotive's master branch for this.

Here's the test zipped site that's throwing the error:

http://dl.dropbox.com/u/18558160/test_locomotive_extends_and_import%0A.zip