Re: error with minimal template

"John P. Rouillard" <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.user
Message-ID <[email protected]>
Hi Ralf and Tonu,

In message <[email protected]>,
Ralf Schlatterbeck writes:
>On Fri, Sep 07, 2018 at 02:41:15PM -0500, Tonu Mikk wrote:
>> When I try to use the tracker created based on the minimal template and no
>> additional modifications, I get this error after logging into the tracker
>> on the web as an admin.  What can I do to eliminate the error?
>> 
>>   File "/usr/lib/python2.7/site-packages/roundup/cgi/templating.py", line
>> 323, in __getattr__
>>     raise AttributeError, attr
>> AttributeError: keyword
>
>This looks to me like the template expects a keyword class, which afaik
>isn't present in the minimal template?
>
>Looks like page.html has several references to keyword which isn't in
>schema.py but at first glance these look like they're guarded with
>permission checks that should fail.

At the top of page.html I see:

   kw_edit python:request.user.hasPermission('Edit', 'keyword');

If 'keyword' doesn't exist, will calling hasPermission throw an error?
(Arguably it should return no permission and not throw an exception,
but the exception makes sure that typoing a field name doesn't cause a
silent failure.)

I traced the distributed minimal template back through history. It
looks like the keyword references in page.html exist back in 2006, but
there is no keyword defined in the schema.

I think the way for Tonu to fix this is to either define keyword in
the schema (look at the classic tracker for the definition), or remove
the references to the keyword field from page.html.

Going forward for the release I think we should remove the keyword
references in the template since the minimal template is not supposed
to support keywords out of the box.

Have a great day.

--
				-- rouilj
John Rouillard
===========================================================================
My employers don't acknowledge my existence much less my opinions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.