Debugging Template Files (tutorial 2 next and previous not working) #64

Closed
opened 4 years ago by jafish · 2 comments
jafish commented 4 years ago (Migrated from github.com)

I'm working through the Pollen tutorial 2, and everything was going swimmingly until I got to section 6.6.3. The next and previous functions aren't returning anything, even when I get to the later section on building custom pagetrees. My pagetree appears properly in the browser via the server (i.e. in section 6.6.5 I only see the three pages). I'm just never seeing any results from next/previous.

Any suggestions to debug this?

Here's what I'm seeing:
Screen_Shot_2020-07-01_at_4 13 21_PM

Thanks in advance for any suggestions!

I'm working through the [Pollen tutorial 2](https://docs.racket-lang.org/pollen/second-tutorial.html), and everything was going swimmingly until I got to section 6.6.3. The `next` and `previous` functions aren't returning anything, even when I get to the later section on building custom pagetrees. My pagetree appears properly in the browser via the server (i.e. in section 6.6.5 I only see the three pages). I'm just never seeing any results from `next`/`previous`. Any suggestions to debug this? Here's what I'm seeing: <img width="900" alt="Screen_Shot_2020-07-01_at_4 13 21_PM" src="https://user-images.githubusercontent.com/115333/86292197-54da6280-bbbe-11ea-9206-ad2bfffb6d71.png"> Thanks in advance for any suggestions!
otherjoel commented 4 years ago (Migrated from github.com)

It looks like you might be running raco pollen start from a folder one level up from the one containing the tutorial files.

We can see from the screenshot that the value of here is tutorial2/article.html. But I am guessing that, per the tutorial, what your custom pagetree actually contains is article.html without the tutorial2/ in front. Nodes in a pagetree nodes must be given relative to the current "root" of the project, which is determined by the folder from which you ran the raco pollen start command.

If you run raco pollen start from within your tutorial2 folder does it work properly?

It looks like you _might_ be running `raco pollen start` from a folder one level up from the one containing the tutorial files. We can see from the screenshot that the value of `here` is `tutorial2/article.html`. But I am guessing that, per the tutorial, what your custom pagetree actually contains is `article.html` without the `tutorial2/` in front. Nodes in a pagetree nodes must be given relative to the current "root" of the project, which is determined by the folder from which you ran the `raco pollen start` command. If you run `raco pollen start` from within your `tutorial2` folder does it work properly?
jafish commented 4 years ago (Migrated from github.com)

@otherjoel I was running raco pollen start from one directory up. Running it in the tutorial2 directory fixed the issue! Thanks so much - nice observation on the path in here.

@otherjoel I was running `raco pollen start` from one directory up. Running it in the tutorial2 directory fixed the issue! Thanks so much - nice observation on the path in `here`.
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mbutterick/pollen-users#64
Loading…
There is no content yet.