Closed jonatan-hoff closed 7 years ago
I can confirm that I am having the same issue using 2.7.0a.
here too.
I worked around this by changing the lines that use link_to
to just template '<a href="%s">%s</a>'
strings instead.
This is likely caused by the loading of the helper module functions dynamically. link_to
does essentially what you are doing @CarlQLange so would you mind sending a PR with your fix please?
Thanks!
Sure! In the meantime here's the relevant lines (plugin.py, line 45 or so):
if page['page_type'] == 'blog':
link = h.literal('<a href="/blog/%s">%s</a>' % (str(page['name']), str(page['title'])))
else:
link = h.literal('<a href="/pages/%s">%s</a>' % (str(page['name']), str(page['title'])))
This solution solved my problem. Thank you
Hello The first time I ran ckan with the plugin enabled the page edit functionality worked fine. When I added my first page the site responds with internal server error on any page containing the navigation menu. The log contained the following error "AttributeError: 'module' object has no attribute 'link_to'". The error occurs in line 45 in the plugin file: "link = h.link_to(page.get('title')". I am running ckan version 2.6.0a. Any idea how to solve this? Thank you