splitbrain / dokuwiki-plugin-bureaucracy

Create forms and generate pages or emails from them
http://www.dokuwiki.org/plugin:bureaucracy
GNU General Public License v2.0
43 stars 47 forks source link

Double entries after combination of "action struct_lookup" and "action template" #299

Open Juergen-aus-Zuendorf opened 3 years ago

Juergen-aus-Zuendorf commented 3 years ago

I have the following form:

<form>

fieldset "Materialdaten"
struct_field "cms_akat_benenn.cms-akat-matnr"
action struct_lookup

fieldset "Grunddaten"
struct_field "cms_akat.cms-akattyp" "=["""",1]"
action template akat:cx:@@cms_akat.cms-akattyp@@:@@cms_akat_benenn.cms-akat-matnr@@

fieldset "Daten anlegen"
submit "anlegen"

</form>

After submitting, I go to a filter page to search for all pages with the relevant struct_field "cms_akat.cms-akattyp", and I always get TWO entries, one with pageid and one without.

The aggregation mentioned above looks like this:

---- struct table ----
schema     : cms_akat
cols       : cms-akattyp, %pageid%
----

Regards Juergen

solewniczak commented 3 years ago

This is because latest version of struct allows to mix the page and lookup data in one schema. I wouldn't consider this a bug - I believe it is how it should work. Why do you need to have both action template and action struct_lookup in one form?

Juergen-aus-Zuendorf commented 3 years ago

I would like to add data as lookup entry and then reference to the same data in the template without copy & paste from one form to another (this is my workaround at the moment).

As you see in my example, the template action uses parameters from both fieldsets.