{"action":"created","issue":{"url":"https://api.github.com/repos/lektor/lektor/issues/63","labels_url":"https://api.github.com/repos/lektor/lektor/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/lektor/lektor/issues/63/comments","events_url":"https://api.github.com/repos/lektor/lektor/issues/63/events","html_url":"https://github.com/lektor/lektor/issues/63","id":124414371,"number":63,"title":"url generation does not work from virtual sources","user":{"login":"vindarel","id":3721004,"avatar_url":"https://avatars.githubusercontent.com/u/3721004?v=3","gravatar_id":"","url":"https://api.github.com/users/vindarel","html_url":"https://github.com/vindarel","followers_url":"https://api.github.com/users/vindarel/followers","following_url":"https://api.github.com/users/vindarel/following{/other_user}","gists_url":"https://api.github.com/users/vindarel/gists{/gist_id}","starred_url":"https://api.github.com/users/vindarel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vindarel/subscriptions","organizations_url":"https://api.github.com/users/vindarel/orgs","repos_url":"https://api.github.com/users/vindarel/repos","events_url":"https://api.github.com/users/vindarel/events{/privacy}","received_events_url":"https://api.github.com/users/vindarel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lektor/lektor/labels/design","name":"design","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/lektor/lektor/milestones/1","html_url":"https://github.com/lektor/lektor/milestones/2.0","labels_url":"https://api.github.com/repos/lektor/lektor/milestones/1/labels","id":1470454,"number":1,"title":"2.0","description":"Next major release.","creator":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":7,"state":"open","created_at":"2015-12-21T23:57:24Z","updated_at":"2016-01-07T15:24:30Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-12-30T23:36:04Z","updated_at":"2016-01-09T09:38:36Z","closed_at":null,"body":"I'm editing lektor.com's sources, adding alternatives. In `layout.html`:\r\n\r\n    <a href=\"{{'.'|url(alt='es')}}\r\n\r\nbut that leads to a cryptic error message on build:\r\n\r\n   E blog/archives/index.html (AttributeError: 'NoneType' object has no attribute 'endswith')\r\n\r\nWhen we go to `blog/archives/index.html` we get the stacktrace:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/builder.py\", line 700, in update\r\n    yield ctx\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/builder.py\", line 922, in build_artifact\r\n    build_func(artifact)\r\n  File \"/home/vince/bacasable/lektorwebsite-copy/packages/blog-archive/lektor_blog_archive.py\", line 139, in build_artifact\r\n    this=self.source)\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/builder.py\", line 590, in render_template_into\r\n    this=this, **extra)\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/environment.py\", line 466, in render_template\r\n    return self.jinja_env.get_or_select_template(name).render(ctx)\r\n  File \"/usr/local/lib/python2.7/dist-packages/jinja2/environment.py\", line 969, in render\r\n    return self.environment.handle_exception(exc_info, True)\r\n  File \"/usr/local/lib/python2.7/dist-packages/jinja2/environment.py\", line 742, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/home/vince/bacasable/lektorwebsite-copy/templates/blog-archive/index.html\", line 1, in top-level template code\r\n    {% extends \"blog-layout.html\" %}\r\n  File \"/home/vince/bacasable/lektorwebsite-copy/templates/blog-layout.html\", line 10, in top-level template code\r\n    {% set feed_url = create_atom_feed(\r\n  File \"/home/vince/bacasable/lektorwebsite-copy/templates/layout.html\", line 48, in top-level template code\r\n    {% block footer %}\r\n  File \"/home/vince/bacasable/lektorwebsite-copy/templates/layout.html\", line 63, in block \"footer\"\r\n    <a href=\"{{'.'|url(alt='fr')}}\">Français</a> •\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/environment.py\", line 385, in <lambda>\r\n    lambda ctx, *a, **kw: url_to(*a, **kw)),\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/context.py\", line 17, in url_to\r\n    return ctx.url_to(*args, **kwargs)\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/context.py\", line 149, in url_to\r\n    rv = self.source.url_to(path, alt=alt, absolute=True)\r\n  File \"/usr/local/lib/python2.7/dist-packages/lektor/sourceobj.py\", line 99, in url_to\r\n    source = self.pad.get(posixpath.join(self.path, path), alt=alt)\r\n  File \"/usr/lib/python2.7/posixpath.py\", line 77, in join\r\n    elif path == '' or path.endswith('/'):\r\nAttributeError: 'NoneType' object has no attribute 'endswith'\r\n```\r\n\r\nThere's a pb with the blog plugin, and a cryptic message.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lektor/lektor/issues/comments/170215289","html_url":"https://github.com/lektor/lektor/issues/63#issuecomment-170215289","issue_url":"https://api.github.com/repos/lektor/lektor/issues/63","id":170215289,"user":{"login":"mitsuhiko","id":7396,"avatar_url":"https://avatars.githubusercontent.com/u/7396?v=3","gravatar_id":"","url":"https://api.github.com/users/mitsuhiko","html_url":"https://github.com/mitsuhiko","followers_url":"https://api.github.com/users/mitsuhiko/followers","following_url":"https://api.github.com/users/mitsuhiko/following{/other_user}","gists_url":"https://api.github.com/users/mitsuhiko/gists{/gist_id}","starred_url":"https://api.github.com/users/mitsuhiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitsuhiko/subscriptions","organizations_url":"https://api.github.com/users/mitsuhiko/orgs","repos_url":"https://api.github.com/users/mitsuhiko/repos","events_url":"https://api.github.com/users/mitsuhiko/events{/privacy}","received_events_url":"https://api.github.com/users/mitsuhiko/received_events","type":"User","site_admin":false},"created_at":"2016-01-09T09:38:36Z","updated_at":"2016-01-09T09:38:36Z","body":"This is now implemented for Lektor 2.0. https://www.getlektor.com/docs/content/paths/\r\n\r\nThe plugin in the lektor website repo is updated to take advantage of this feature."}}