Closed microniko closed 7 years ago
The plugin depends on a feature in Nikola which was just merged into master yesterday (that implemented generic_renderer
). You need to install the master branch from GitHub, or it doesn't work at the moment. (Also see the last paragraph in https://github.com/getnikola/plugins/blob/master/v7/errorpages/README.md.)
Ok, thanks ! I'll wait the next release… (404 error ;)
Waiting is definitely less hassle (if you don't want to hack on Nikola anyway)... I don't know what the current release plans are, but usually it's not too long.
I'll attempt a release later this week.
Chris Warrick https://chriswarrick.com/
On 10 Oct 2016 08:13, "Felix Fontein" notifications@github.com wrote:
Closed #176 https://github.com/getnikola/plugins/issues/176.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/getnikola/plugins/issues/176#event-817611695, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT-m01oDsrUrLJgQdZPPw1uKfddT8I-ks5qydeCgaJpZM4KSHLD .
Nikola 7.8.1 is released now, so errorpages
should now work out of the box. :)
Woaw :-(
I updated Nikola to 7.8.1 but errorpages
does not still work …
$ nikola build Scanning posts......done! . errorpages:output/404.html ######################################## TaskError - taskid:errorpages:output/404.html PythonAction Error Traceback (most recent call last): File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/doit/action.py", line 383, in execute returned_value = self.py_callable(_self.args, _kwargs) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/nikola/nikola.py", line 1318, in render_template template_name, None, local_context) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/nikola/plugins/template/mako.py", line 117, in render_template data = template.render_unicode(_context) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/mako/template.py", line 454, in render_unicode as_unicode=True) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/mako/runtime.py", line 829, in _render __kwargs_forcallable(callable, data)) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/mako/runtime.py", line 864, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/mako/runtime.py", line 890, in _exectemplate callable(context, _args, _kwargs) File "/home/toto/site/www/cache/.mako.tmp/base.tmpl.py", line 64, in render_body __M_writer(str(base.html_headstart())) File "/home/toto/site/www/cache/.mako.tmp/base_helper.tmpl.py", line 241, in render_html_headstart __M_writer(str(url_replacer(permalink, '/assets/js/html5.js', lang))) File "/home/toto/envvirt/nikola/lib/python3.5/site-packages/nikola/nikola.py", line 1370, in url_replacer src_elems = parsed_src.path.split('/')[1:] TypeError: a bytes-like object is required, not 'str'
Looks like some problem with the default theme. I don't use the default theme so I never experienced that.
Looks like the default base plugin does some weird stuff with url_replacer
and tries to insert relative links, which will obviously not work with error pages. What a mess. Also, it expects that every page has permalink
set to the URL for the current page, which this plugin doesn't do.
You could work around the first issue by passing url_type to templates, and the second one by checking for permalink not being None, I guess. (Both are global changes to Nikola core. Speaking of which, getnikola/nikola#2544 could use a review)
@microniko: the issue is now fixed if you use Nikola's master branch and the updated plugin.
Thanks @felixfontein.
But I tried with github version and I have the same problem with yesplease
and bootstrap3
themes.
Closing. If this still happens, we can always reopen.
I install errorpages plugins but when I compiled the website, I have this error :
What happens ?!