divio/django-cms — pull request #1638 by tomds (2013-02-15 10:41:40+00:00)
Title: Error when clicking a page link in the admin

I have checked out the develop branch of the code, done a clean django CMS install and added a page in the admin. When I click on the link to the newly-created page in the admin, I get:

```
TypeError at /admin/cms/page/1/
'NoneType' object is unsubscriptable
cms/admin/pageadmin.py in get_unihandecode_context, line 465
```

If I instead click the "EN-GB" link to view the page, the error doesn't happen. Looking at the code, I think it's because the new `get_unihandecode_context()` method in 6f634e96dbdb7f21e480fa1e0d050178bfe55cf7 is always expecting there to be a language specified in the querystring, but when you click the main link in the admin rather than the EN-GB link, there are no parameters in the querystring. So I have fixed this by first checking if the `language` parameter exists.