[MKDoc-dev] Re: [MKDoc-users] [BUG] 1.8 ./.admin.userlist 500 error

Chris Croome chris at webarchitects.co.uk
Fri Sep 24 11:45:14 BST 2004


Hi

On Fri 24-Sep-2004 at 11:29:37AM +0100, Chris Croome wrote:
> 
> When someone is either not logged on or are logged on without admin
> permissions they should receive a 404 error when accessing the user list
> at this URI:
> 
>   ./.admin.userlist
> 
> However there is a 500 error:
> 
>   Can't call method "id" on an undefined value at /usr/local/mkdoc-1-8/flo/plugin/Admin/UserList.pm line 12.
> 
> This is line 12 of UserList.pm:
> 
>   $self->user()->id() == 1    || return;

The above is still a bug.

> When you are logged on as an admin user then there is a different error:
> 
>   http://lists.webarch.co.uk/pipermail/mkdoc-users/2004q3/000109.html
> 
> This is caused because in the template for the <head> of admin/editor pages,
> /resources/fragments/head_admin/en.html there is this JavaScript which is
> _only_ needed when editing page contents (it is for the WYSIWYG editor):
> 
>   <script type="text/javascript" src="/.resources/xeditor.js"></script>
>   <script type="text/javascript" petal:condition="true: self; true: self/components --html">
>     // call this at body.onload:
>     function init() {
>       use_lang ('${self/language');
>       <?for name="element self/components --html"?>
>       make_wysiwyg ('${element/block_name}');
>       <?end?>
>     }
>   </script>

This has been fixed by moving the JS into
resources/templates/admin/content/en.html and also fixing a missing
curly bracket and the changes have been committed to CVS.

Chris

-- 
Chris Croome                               <chris at webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   


More information about the MKDoc-dev mailing list