dokuwiki-plugin-bureaucracy
dokuwiki-plugin-bureaucracy copied to clipboard
Struct field as multiple lookup value fails
Hello,
using Struct_field for "normal" lookup values is possible with the template action without any problems. But if the lookup field is defined as multiple entry field, the data transfer to the newly created page fails.
Example:
<form>
Fieldset "Grunddaten"
number "Nummer" 0000000
Fieldset "Strukturdaten"
Struct_field "cms_meta.cms-bereiche" !
Struct_field "cms_meta.cms-doktyp" "=["""",6]" !
Fieldset "Seite anlegen"
submit "Hier klicken"
Action template playground:tpl_modul playground:module:@@Nummer@@
</form>
The field "cms_meta.cms-doktyp" has a single value, the field "cms_meta.cms-bereiche" can have several values. The result is that on the new page "cms-doktyp" is filled, but "cms-bereiche" is not.
Best regards Juergen
I have a similar issue with a "normal" lookup field. The struct part works OK, only the bureaucracy template mode fails with one lookup struct_field.
Action template nutzer:teilnahme:template_teilnahme
nutzer:teilnahme:@@teilnahme.person@@:@@teilnahme.kompetenz@@%Y%m%d%H%M
struct_field "teilnahme.person"
struct_field "teilnahme.kompetenz"
the page will be created as nutzer:teilnahme:adam:202212201213 not nutzer:teilnahme:adam:laborsicherheit202212201213 as expected.
The definition of the struct lookup fields is similar. I can substitute "teilnahme.kompetenz" by others in the schema and it will work.
{
"ismulti": false,
"label": "person",
"class": "Lookup",
"config": {
"visibility": {
"inpage": true,
"ineditor": true
},
"schema": "person",
"field": "wiki_name",
"label": {
"de": "Teilnehmende Person"
},
}
},
{
"ismulti": false,
"label": "kompetenz",
"class": "Lookup",
"config": {
"visibility": {
"inpage": true,
"ineditor": true
},
"schema": "kompetenzarten",
"field": "name",
"label": {
"de": "Zu erwerbende Kompetenz"
},
}
},
If you find a reason, please tell.