https://bugzilla.wikimedia.org/show_bug.cgi?id=34326

       Web browser: ---
             Bug #: 34326
           Summary: SemanticForms: Partial forms and nested templates.
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: SemanticForms
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified


I have a form with nested templates:

> {{{info}}}
> {{{for template|Cache}}}
> ...Cache fields...
> {{{field|Locations|holds template}}}
> {{{end template}}}
> {{{for template|Cache/Location|multiple|embed in field=Cache[Locations]}}}
> ...Location fields...
> {{{end template}}}

Everything works good. Page code looks as expected:

> {{Cache
> |...Cache fields...
> |Locations={{Cache/Location|...}}{{Cache/Location|...}}...
> }}

I have an additional *partial* form:

> {{{info|partial form}}}
> {{{for template|Cache}}}
> <!-- No Cache fields, just next one. -->
> {{{field|Locations|holds template}}}
> {{{end template}}}
> {{{for template|Cache/Location}}}
> ...Location fields...
> {{{end template}}}

After editing a page with this partial form, all the Location templates *moved*
*out* of Cache, while Locations field receives strange value:

> {{Cache
> |...Cache fields...
> |Locations=@replace_Cache___Locations@
> }}
> {{Cache/Location|...}}{{Cache/Location|...}}...

That's obviously a big. Partial form should not move nested templates out of
main template.

However, there is a workaround: removing "partial form" specifier from partial
form definition. Such a "non-partial" form produces correct result, but I am a
bit afraid -- formally it is declared as partial form, so it does not have to
save non-used fields of main template, does it?

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to