This occurs in _assets/js/events.js_:143. None of the sidebar items are shown. I suspect _lib/ex_doc/formatter/html/templates.ex_:122 is never getting executed, but I don鈥檛 know why.
This occurs in various browsers, including Safari v9.1, Firefox 49 (MacOS), and Opera 41 (MacOS).
@njonsson Where did you see that error? URI? Did you clean your cache first?
Yes, I removed _doc/_, ran mix docs, cleared my browser cache, and reopened _doc/index.html_. The error recurs.
@njonsson Could you please tell me which ExDoc version are you using?
I just run the following test with ExDoc from the master branch:
$ cd ~/Dev/elixir-lang/
$ rm -rf doc
$ make docs_elixir
==> elixir (compile)
==> ex_doc (elixir)
bin/elixir ../ex_doc/bin/ex_doc "Elixir" "1.4.0-dev" "lib/elixir/ebin" -m "Kernel" -u "https://github.com/elixir-lang/elixir" --source-ref "1f11071505b0af6b5c6f5293bbb7ada401dab6c5" -o doc/elixir -n http://elixir-lang.org/docs/master/elixir/ -p http://elixir-lang.org/docs.html -f "html" -e "lib/elixir/pages/Behaviours.md" -e "lib/elixir/pages/Guards.md" -e "lib/elixir/pages/Naming Conventions.md" -e "lib/elixir/pages/Operators.md" -e "lib/elixir/pages/Typespecs.md" -e "lib/elixir/pages/Writing Documentation.md"
$ open doc/elixir/index.html

Tested on:
I am using ExDoc v0.14.3.
I have more information on the potential source of the problem. My _mix.exs_ contains ExDoc options in the def project do block. When I remove these options, the generated docs have no JavaScript errors. Note that the referenced files, _README.md_, _License.md_, and _History.md_, all exist in the root of my project.
docs: [extras: ["README.md": [filename: "about",
title: "About my project"],
"License.md": [filename: "license",
title: "Project license"],
"History.md": [filename: "history",
title: "Project history"]]]
@njonsson could you please push a small project to github that reproduces the error? It would help us a lot on fixing it. :)
Nevermind, I can reproduce it on Elixir source: http://elixir-lang.org/docs/master/elixir/behaviours.html#full-list :)
@josevalim The issue is that we create first the extra pages... and then the sidebar_items-<rev>.js. So, when you create an extra page... head_template.eex returns nil :(
@josevalim Are you working on this?
@milmazz yes :)
Fixed in master. It also allowed us to remove the duplication between epub/html formatters in regards to extra handling.
Most helpful comment
@milmazz yes :)