aldryn / aldryn-blog

aldryn-blog IS DEPRECATED. PLEASE USE aldryn-newsblog!
Other
20 stars 35 forks source link

Issues while installing #26

Closed FinalAngel closed 11 years ago

FinalAngel commented 11 years ago

At first install there needs to be a blog entry, otherwise the following error occurs while adding the tags plugin:

IndexError at /en/applications/blog/
list index out of range

Additionally I get the following error after creating an entry:

NoReverseMatch at /en/applications/blog/
u'aldryn_blog' is not a registered namespace
szuliq commented 11 years ago

@FinalAngel can you provide django CMS version you're using, please?

FinalAngel commented 11 years ago

I use the latest develop version of django-cms

bogdal commented 11 years ago

I fixed list index out of range issue. In the second case after the publication of the blog page we have to restart app. I'm not sure how we should handle this, maybe return more descriptive error?

FinalAngel commented 11 years ago

The issue occurs here:

<p class='blog-author'>by <a href="{% url 'aldryn_blog:author-posts' post.author.username %}">{{ post.author|user_name }}</a></p>

thats the last line:

                              args=args, kwargs=kwargs,
                              current_app=context.current_app)
                except NoReverseMatch:
                    if self.asvar is None:
                        # Re-raise the original exception, not the one with
                        # the path relative to the project. This makes a
                        # better error message.
                        raise e ...
            else:
                if self.asvar is None:
                    raise e
        if self.asvar:
            context[self.asvar] = url
bogdal commented 11 years ago

This issue occurs because we want to display posts, despite the fact that we didn't restart app after the publication of the page. What I can do is add try/catch for reverse and display appropriate message e.g "You have to restart app" or something like that. What do you think?

digi604 commented 11 years ago

could this be related: https://github.com/divio/django-cms/pull/2156

FinalAngel commented 11 years ago

I manually changed the apphook namespace and restarted the server, than it worked.

FinalAngel commented 11 years ago

You also need to ensure migrations and syndb worked correctly