# Zola 12 Serv slug issue

**URL:** <https://zola.discourse.group/t/zola-12-serv-slug-issue/595>\
**Category:** Support\
**Created:** [September 16, 2020, 1:11pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595 "2020-09-16T13:11:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 1:11pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/1 "2020-09-16T13:11:14Z")

</div>

# Serve issue

This is a little difficult to explain but…I have a site that works with Zola 11, when I serv the same site with Zola 12 I get `not found` errors trying to navigate the a page with a specific slug. When I look in the local public folder for the index.html (it’s missing) but I assumed this is due to the html being rendered from memory now not from disk. When I run a `zola build` the correct directory is generated with an index.html.

Using zola 12.

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola --version
zola 0.12.0

```

Start up a local serv:

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101
Building site...
-> Creating 178 pages (0 orphan), 6 sections, and processing 0 images
Done in 20.0s.

Listening for changes in C:\Users\Iria\Zola\production{config.toml, content, static, templates}
Press Ctrl+C to stop

Web server is available at http://192.168.1.101:2015

```

Using a known markdown page which has a slug specified:

```auto
...
# SLUG: Learning How To Speak English
slug = "learn-how-to-speak-english-1"
...

```

Which is in a content folder called `lessons`

Config.toml has slugify settings:

```auto
# Various slugification strategies, see below for details
# Defaults to everything being a slug
[slugify]
paths = "on"
taxonomies = "on"
anchors = "on"

```

> Note: I’ve also tried this with the [slugify] section removed, i.e. the default `on` condition should apply.

I expect output at the following URL:

```auto
http://192.168.1.101:2015/lessons/learn-how-to-speak-english-1/

```

I have the browser cache turned off. This is what I get:

 ![page-not-found](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/4dca8e1bcde0c05e65d36baddd7b2938d660ed8f.jpeg)

When I build the site

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola build -u https://adeptenglish.com -o ..\deployment\ZOLA12-SLUG
Building site...
-> Creating 178 pages (0 orphan), 6 sections, and processing 0 images
Done in 25.5s.

```

And look for this page `\ZOLA12-SLUG\lessons\learn-how-to-speak-english-1`

```auto
... \ZOLA12-SLUG\lessons\learn-how-to-speak-english-1\index.html 

```

# Observations

- I’ve specified I want to use my own slug
- when the site is built it uses the slug I provided (creating a content directory under lessons using my slug’s name
- When I run serv, the same page is **not navigable to** getting error `not found`

So I expect the built version to server the content (I havent had time to test this yet). Will get back as soon as I have.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 1:17pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/2 "2020-09-16T13:17:17Z")

</div>

Ah might be a bug in the new zola serve handling. If you can create a small repo showing the issue, I should be able to fix it quickly

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 1:43pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/3 "2020-09-16T13:43:10Z")

</div>

I’ve created a minimal example, and attached a zip if that helps?

[Dropbox download](https://www.dropbox.com/s/1jatoke6lh0qvbu/serv-repo.zip?dl=0)

**Updated to include a basic template!**

If you run this as serv - the page does not exist, and I cannot browse to it:  
`zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101`  
URL should be: `192.168.1.101:2015/lessons/learn-english-conversation-1/`

If you run this as build - the output directory `lessons\learn-english-conversation-1\index.html` **exits**.

```auto
zola build -u https://adeptenglish.com -o .\ZOLA12-Slug-Serv

```

So a web server would serve the content fine.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 1:56pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/4 "2020-09-16T13:56:17Z")

</div>

Thanks!  
I’ve created [Zola 12 RSS Issues](https://zola.discourse.group/t/zola-12-rss-issues/588) to track all the bugs in GH. Seeing the number of bugs, it looks like we’ll need to do a 0.12.1.

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 2:06pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/5 "2020-09-16T14:06:45Z")

</div>

Sorry to just list issues one after the other, I’d love to move on to using the new features, which I’m so happy you and the other developers have managed to squeeze in to Zola 12.

It’s just I’ve not been able to get to the _good stuff_ until we can take a view on migrating the existing site from Zola 11 without breaking it.

I **really do appreciate** the time you and the others have taken.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 2:37pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/6 "2020-09-16T14:37:52Z")

</div>

No it’s great that you report them! This way we can actually add tests for them if possible and fix them instead of not knowing about them.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 6:52pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/7 "2020-09-16T18:52:32Z")

</div>

I’m getting

```auto
thread '<unnamed>' panicked at 'error binding to 192.168.1.101:2015: error creating server listener: Can't assign requested address (os error 49)', /Users/vincentprouillet/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.7/src/server/mod.rs:124:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: WS Error <Io(Os { code: 49, kind: AddrNotAvailable, message: "Can\'t assign requested address" })>', src/cmd/serve.rs:324:44
^C⏎                                                                                                                                                                                                       

```

so that’s one more bug, there shouldn’t be an unwrap.

Running it with just `zola serve` does work just fine though 😕

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 16, 2020, 7:07pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/8 "2020-09-16T19:07:42Z")

</div>

Curious, it doesn’t crash like that on Windows 10, for me. Maybe you have a firewall or port 2015 is already in use?

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 16, 2020, 7:29pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/9 "2020-09-16T19:29:38Z")

</div>

Probably but the main thing is that it does work fine without mentioning ip/ports. Can you try a plain `zola serve` on your machine?

Edit: since you’re on Windows it might also be a Windows issue

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 17, 2020, 7:45am UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/10 "2020-09-17T07:45:44Z")

</div>

Interesting result.

Running just serve:

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola serve
Building site...
-> Creating 178 pages (0 orphan), 6 sections, and processing 0 images
Done in 24.0s.

Listening for changes in C:\Users\Iria\Zola\production{config.toml, content, static, templates}
Press Ctrl+C to stop

Web server is available at http://127.0.0.1:1111

```

I had to set the base url in cofig.

```auto
# The URL the site will be built for
base_url = "http://127.0.0.1:1111"

```

Browse to the site. It gets further, the page is rendered but no images for those pages are rendered. Which is weird because the section and main site index all work fine, it’s just pages in lower directories in the content directory structure.

# overvations

\ = renders index + images (\content)  
\lessons = section + images rendered for (\content\lessons\_index.md)  
\lessons\article = article text renders but no images (\content\lessons\article\index.md)

> Note: However the section (list of articles in a taxonomy fail to load when you click on them).

So for `pronunciation` taxonomy pages, [which should look like this](https://adeptenglish.com/english/pronunciation/) these `http://127.0.0.1:1111/english/pronunciation/` won’t render.

> Note: After trying to browse a few pages, it looks like the internal sever has crashed as it starts to fail on previously successful pages.

After CTRL+C I ran the server command again. This time it would not serve the pages even with images, it just said same as yesterday `not found`.

I don’t understand how just running it twice in a row gets a different result, maybe it’s a cache issue? Maybe the serve process is dying/crashing but staying alive on a port/ip?

The site looks OK until you get to content that’s below a section or a taxonomy, then you get inconsistent behavior.

> If I get time this afternoon, I will setup the build on linux and/or one of our mac’s, to check if this is something related to our site.

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 18, 2020, 7:10am UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/11 "2020-09-18T07:10:47Z")

</div>

I’ve just knocked up a [video of the issue](https://www.dropbox.com/s/mwkiazpb5q1i7zo/zola-serve.mp4?dl=0). Which might help explain whats happening a little better.

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [September 18, 2020, 11:12am UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/12 "2020-09-18T11:12:21Z")

</div>

I have the same issue, but on Windows only. On Linux all works great.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 18, 2020, 12:44pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/13 "2020-09-18T12:44:50Z")

</div>

Argh, can someone on Windows try to debug it?

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [September 19, 2020, 11:26am UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/14 "2020-09-19T11:26:28Z")

</div>

I don’t know if it will be useful but take a look to the port of the websocket server. It’s trying to get ws://127.0.0.1:1024

 ![изображение](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/d6bdc4eb46cc012a624c9f4a5240d3512384ab33.png)

![изображение](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/eff49292dcfcf616ffe93d0605af0b5c66a3c9ec.png)

---

<div class="post-metadata">

**Author:** ![Hoverbear](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@Hoverbear](https://zola.discourse.group/u/Hoverbear)\
**Post date:** [September 19, 2020, 4:19pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/15 "2020-09-19T16:19:24Z")

</div>

I hit what I think is this as well?

While diagnosing I noticed that `zola serve` doesn’t create all the pages `zola build` does anymore:

 ![image](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/bf0eed6b4f8a50a889ef39d9271a2bc9f52d68ae.png)

---

<div class="post-metadata">

**Author:** ![Hoverbear](https://avatars.discourse-cdn.com/v4/letter/h/3be4f8/32.png) [@Hoverbear](https://zola.discourse.group/u/Hoverbear)\
**Post date:** [September 19, 2020, 5:23pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/16 "2020-09-19T17:23:33Z")

</div>

I also noted that the `index.md` for this page is not created:

 ![image](https://global.discourse-cdn.com/free1/uploads/zola1/original/1X/0fa734a1f4a2f0f0d010fdd2b9680209b2fe0a8d.png)

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 20, 2020, 12:39pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/17 "2020-09-20T12:39:24Z")

</div>

Related issue: [Some pages not found on Windows in zola serve · Issue #1169 · getzola/zola · GitHub](https://github.com/getzola/zola/issues/1169)

> [@Hoverbear](#):
>
> While diagnosing I noticed that `zola serve` doesn’t create all the pages `zola build` does anymore

Yep that’s normal. `zola serve` now stores the HTML output in a hashmap that the hyper server looks up to. I am guessing the path on Windows is different, resulting in some 404.

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [September 21, 2020, 7:58am UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/18 "2020-09-21T07:58:21Z")

</div>

Can you try [https://github.com/getzola/zola/pull/1175](https://github.com/getzola/zola/pull/1175) to see if it solves the issue for you? I really need to add more tests for Windows

---

<div class="post-metadata">

**Author:** ![SgtIria](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/sgtiria/32/85_2.png) [@SgtIria](https://zola.discourse.group/u/SgtIria)\
**Post date:** [September 21, 2020, 1:56pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/20 "2020-09-21T13:56:58Z")

</div>

I’ve just quickly learned how to build a release based on a PR, in this case PR 1175.  
I did this to get the PR

```auto
C:\Users\Iria\Zola\zola (master -> origin)
λ git fetch origin pull/1175/head:zola-pr-1175
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 12 (delta 10), reused 12 (delta 10), pack-reused 0
Unpacking objects: 100% (12/12), done.
From https://github.com/getzola/zola
 * [new ref] refs/pull/1175/head -> zola-pr-1175

```

I’ve built `zola 13` on Windows 10.

```auto
C:\Users\Iria\Zola
λ cd zola\

C:\Users\Iria\Zola\zola (zola-pr-1175 -> origin)
λ git status
On branch zola-pr-1175
nothing to commit, working tree clean

C:\Users\Iria\Zola\zola (zola-pr-1175 -> origin)
λ git branch
  master
* zola-pr-1175

C:\Users\Iria\Zola\zola (master -> origin)
λ git checkout zola-pr-1175
Switched to branch 'zola-pr-1175'

```

```auto
C:\Users\Iria\Zola\production (master -> origin)
λ zola --version
zola 0.13.0

C:\Users\Iria\Zola\production (master -> origin)
λ zola serve -i 192.168.1.101 -p 2015 -u 192.168.1.101
Building site...
-> Creating 180 pages (0 orphan), 6 sections, and processing 0 images
Done in 25.2s.

Listening for changes in C:\Users\Iria\Zola\production{config.toml, content, static, templates}
Press Ctrl+C to stop

Web server is available at http://192.168.1.101:2015

```

From initial testing it seems to work. I mean the nested content is being rendered in Windows by Zola serve.

We’ll test it some more and get back to this thread.

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [September 21, 2020, 2:53pm UTC](https://zola.discourse.group/t/zola-12-serv-slug-issue/595/21 "2020-09-21T14:53:37Z")

</div>

Sorry I built the wrong brunch first time, **it works!**

@Sgtlria you can clone the single brunch: `git clone --single-branch --branch in-memory-paths https://github.com/rune-rs/zola.git`

[Next page](https://zola.discourse.group/t/zola-12-serv-slug-issue/595.md?page=2)
