Last modified: 2013-12-18 03:26:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45824, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43824 - Parameter "holds template" is incompatible on templates with "multiple"
Parameter "holds template" is incompatible on templates with "multiple"
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
SemanticForms (Other open bugs)
unspecified
All All
: Unprioritized enhancement (vote)
: ---
Assigned To: Yaron Koren
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-10 14:15 UTC by Tiago Ferreira
Modified: 2013-12-18 03:26 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tiago Ferreira 2013-01-10 14:15:05 UTC
If a template is meant to embedd a template with "Holds template" and "embed in field", then it cannot be a multiple use template, as the browser will never show the embedded template.

This also means that it is impossible to create a multi level tree form, which would be extremelly interesting

The following code should in theory works, but demonstrates the behaviour.

<noinclude>

{{#forminput:form=Template Server}}

</noinclude><includeonly>


{{{for template|Group|multiple|label=Group}}}
'''Test'''
'''HDD1:''' {{{field|HDD1|holds template}}}
{{{end template}}}

{{{for template|HDD|embed in field=Group[HDD1]}}}
'''Test'''
'''Type:''' {{{field|Type}}}
'''Type2:''' {{{field|Type2}}}

{{{end template}}}



'''Text:'''

{{{standard input|free text|rows=10}}}


{{{standard input|summary}}}

{{{standard input|minor edit}}} {{{standard input|watch}}}

{{{standard input|save}}} {{{standard input|preview}}} {{{standard input|changes}}} {{{standard input|cancel}}}
</includeonly>
Comment 1 Yaron Koren 2013-01-10 14:31:10 UTC
Hi - this doesn't surprise me, since I don't think combining "holds template" with "multiple" makes sense. How will the form know which instance of template A it should add each instance of template B to?
Comment 2 Tiago Ferreira 2013-01-10 15:03:30 UTC
Hi,

After awhile I gave up trying just because I got to the same conclusion as you, and that a problem realy exists.

However, my problem is not "Why" it doesn't work, but how to get how to get it to work. My end goal is, if possible, to create multi level form, in a tree.
Comment 3 Yaron Koren 2013-01-10 15:10:25 UTC
Well, let me re-ask my question, then: how is the form supposed to decide which instance of B goes into which instance of A?
Comment 4 Tiago Ferreira 2013-01-10 15:47:42 UTC
I think i'm not gettin to your point.

Taking your example from somewhere, should be similar to the following


{{Person
...
|Places lived={{Place lived|location={{location|...}}}}{{Place lived|location={{location|...}}}}{{Place lived|location={{location|...}}}}
|Companies worked at={{Company worked at|...}}{{Company worked at|...}}
...
}}

if you can embed one template onto another, doing it recursively should be possible right?
Or am I missing something?
Comment 5 Yaron Koren 2013-01-10 15:54:03 UTC
Oh, I see - you want one "location" template in every "Place lived" template. (In other words, one instance of B for every instance of A.) That's not possible - but if that's all you want to do, why bother with a "location" template at all; why not just pass all the fields in directly to "Place lived"?
Comment 6 Tiago Ferreira 2013-01-10 17:09:53 UTC
(In reply to comment #5)
> Oh, I see - you want one "location" template in every "Place lived" template.
> (In other words, one instance of B for every instance of A.) That's not
> possible - but if that's all you want to do, why bother with a "location"
> template at all; why not just pass all the fields in directly to "Place
> lived"?

Hi,

Because I'd like to scale it horizontaly and vertically, for a tree structure:

{{class
...
|subclass var={{subclass|var1={{subsubclass|var2={{subsubsubclass}}{{subsubsubclass}}{{subsubsubclass}}}}{{subsubclass|var2={{subsubsubclass}}}}


Or from the tree perspective (not really equal as above):

Class
  |
  |-> Subclass
  |    |
  |    |-> Subsubclass
  |    |
  |    |-> Subsubclass
  |
  |-> Subclass
  |
  |-> Subclass

The problem is that my goal is to make all subclasses anonymous, inside the same object/page, otherwise I could simply create new pages.

Right?
Comment 7 Yaron Koren 2013-01-10 17:17:40 UTC
Okay - that's a rather different structure from the example you gave before. But I have no plans to have SF handle that level of complexity. Plus, SMW can't store more than two levels of data anyway.
Comment 8 Tiago Ferreira 2013-01-10 17:57:53 UTC
Understood.
I need to study SMW a little further before going deeper on this.
Comment 9 Yaron Koren 2013-12-18 03:26:22 UTC
Changing this to "wontfix".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links