Forum OpenACS Development: Re: XoWiki

Collapse
69: Re: XoWiki (response to 68)
Posted by Nima Mazloumi on
I was not able to reproduce the policy3 error but the unknown variable 'myvar' still exists even with a new Form and FormPages.

You can reproduce it this way. Create a new form:

template:leave empty
form:

<form>
<div class="form-item-wrapper">
<div class="form-label">Alternativen 
</div>
<div class="form-widget">Alt 1
<input type="checkbox" value="t" name="a1" /> Alt 2
<input type="checkbox" value="t" name="a2" />
</div>
</div>
</form>

constraints:
@cr_fields:hidden a1:boolean a2:boolean

Now create a new formpage but only check one of the two boxes. If you view the page everything is still fine.

now go back to form and add this to the form template:
@a1@ @a2@

Go back to the formpage. now you should get the message:
**** unknown variable 'a2' **** (::6546417 ::xowiki::FormPage->get_value)

Another problem I found while testing: Go back to form and add this constraint:

@table:a1,a2

When you go to the list view you will see one saying "yes" and one empty. Now edit the formpage and deselect the one selected and go back to the list view. it is still saying yes. go back and select the second save and deselect it and go to list view. now both say "yes".

A third thing I found: If I change to policy3 the list view is not permitted even though I am swa and have admin rights on the xowiki instance.

Collapse
70: Re: XoWiki (response to 69)
Posted by Gustaf Neumann on
Hi Nima,

the test cases appear to be correct in the head version. In the case of the table view, with "@table:a1,a2", it says first "yes" "no" and then "no" "no". I am not sure if it is worth backporting the fixes from the head version to oacs-5-3, since it is in some respects already quite different, and i have a very tough schedule until i leave on monday morning (including the materials for the conference).

The plan is to produce another stable version from head in the oacs-5-4 branch, which will have these problems fixed.

The permission stuff is simple to fix, there were no rules for Form in policy2 and policy3; see:
http://cvs.openacs.org/cvs/openacs-4/packages/xowiki/tcl/package-procs.tcl?r1=1.94&r2=1.95
One is only allowed to call methods if a policy permits it. Removing entries from there (or not adding it) makes methods unaccessible via the url interface.

Collapse
71: Re: XoWiki (response to 70)
Posted by Nima Mazloumi on
Thank you. I will test with head version.