Modify

Opened 15 years ago

Closed 15 years ago

#7168 closed defect (fixed)

WikiForms getting error with Trac 0.12b1

Reported by: David.Byrne@… Owned by: asic_druide
Priority: high Component: WikiFormsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.12

Description

I think I've implemented WikiForms correctly. I had TracForms installed and working when I found WikiForms. I've reimplemented using WikiForms but I'm getting an error in the ticket when I try to mark completed.

Here is my wiki form code:

Error: Failed to load processor WikiForms
No macro or processor named 'WikiForms' found

I saved this off as a wiki page. I then included this page in a ticket using

Wiki page "PAGENAME" does not exist

.

The wiki form shows up correctly, but when I hit the completed button I get:

Trac detected an internal error:

AssertionError: Response already started

It does update the ticket when I exit and go back in. My check boxes are marked and values now show up. I'm just getting this error.

Attachments (0)

Change History (3)

comment:1 Changed 15 years ago by David.Byrne@…

Sorry, forgot to mark out the code so that the wiki doesn't process it.

{{{
#!WikiForms

|| || '''When''' || '''Who''' || '''What''' || '''Brand/Notes'''
|| <tf>checkbox:milk</tf> || <tf>when:milk</tf> || <tf>who:milk</tf> || Milk || <tf>input:milk_notes</tf> ||
|| <tf>checkbox:eggs</tf> || <tf>when:eggs</tf> || <tf>who:eggs</tf> || Eggs || <tf>input:eggs_notes</tf> ||
|| <tf>checkbox:bread</tf> || <tf>when:bread</tf> || <tf>who:bread</tf> || Bread || <tf>input:bread_notes</tf> ||
|| <tf>checkbox:beer</tf> || <tf>when:beer</tf> || <tf>who:beer</tf> || Beer || <tf>input:beer_notes</tf> ||
|| <tf>checkbox:pasta</tf> || <tf>when:pasta</tf> || <tf>who:pasta</tf> || Pasta || <tf>input:pasta_notes</tf> ||
<tf>submit:
# label    : label on the button, defaults to 'Send'
# class 
# id 
label='Completed'</tf>

}}}

comment:2 Changed 15 years ago by David.Byrne@…

I found the issue. It also happened with TracForms and I had fixed it there. Trac 0.12 requires the Content-Length headers. The change I made to wikiforms.py is:

201a202

req.send_header('Content-Length', 2)

206a208

req.send_header('Content-Length', 2)

211a214

req.send_header('Content-Length', len(str(e)))

comment:3 Changed 15 years ago by asic_druide

Resolution: fixed
Status: newclosed

fixed in r8022

Thanks David for the patch.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain asic_druide.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.