Hi,
I got the following problem and till now i haven't read about it somewhere.
Conclusion:
It seems that there is a problem with a
"struct lookup variable that is looking into another schema"
within
a bureaucracy form
Explanation:
I'm using 2 struct shemas. The first one is used to define the projects I'm working on so it has the project number and the project name.
The second schema is for the documents inside the projects. There I define for example the type of document. To link the schemas together I use a Lookupvariable in the second schema to get the project number from the first schema.
The schemas are the following:
1)
{
"structversion": "2021-01-16",
"schema": "projekte",
"id": "108",
"user": "...",
"config": {
"allowed editors": "",
"label": {
"de": ""
}
},
"columns": [
{
"colref": 1,
"ismulti": false,
"isenabled": true,
"sort": 10,
"label": "Komm",
"class": "Text",
"config": {
"visibility": {
"inpage": false,
"ineditor": true
},
"prefix": "",
"postfix": "",
"label": {
"de": "Komm.-Nr."
},
"hint": {
"de": "Kommissions-Nr. "
}
}
},
{
"colref": 2,
"ismulti": false,
"isenabled": true,
"sort": 20,
"label": "Name",
"class": "Text",
"config": {
"visibility": {
"inpage": false,
"ineditor": true
},
"prefix": "",
"postfix": "",
"label": {
"de": "Projekttitel"
},
"hint": {
"de": "Projekt-Name \/ -Bezeichnung"
}
}
}
]
}
2)
{
"structversion": "2021-01-16",
"schema": "projektunterlage",
"id": "107",
"user": "...",
"config": {
"allowed editors": "",
"label": {
"de": ""
}
},
"columns": [
{
"colref": 1,
"ismulti": false,
"isenabled": false,
"sort": 10,
"label": "Komm",
"class": "Lookup",
"config": {
"visibility": {
"inpage": false,
"ineditor": true
},
"schema": "projekte",
"field": "komm",
"label": {
"de": "Komm.-Nr."
},
"hint": {
"de": "Komissions-Nr."
}
}
},
{
"colref": 2,
"ismulti": false,
"isenabled": true,
"sort": 20,
"label": "Typ",
"class": "Text",
"config": {
"visibility": {
"inpage": false,
"ineditor": true
},
"prefix": "",
"postfix": "",
"label": {
"de": "Typ"
},
"hint": {
"de": "Typ bzw."
}
}
}
]
}
Now I want to produce a document with the bureaucracy plugin. For example like:
<form>
action template vorlagen:templates:qds000303 "projekte:@@projektunterlage.komm@@:qds000303"
struct_field "projektunterlage.komm"
submit "Anlegen"
</form>
But when i try to make a new document with this form i get the following error:
Warning: preg_replace(): Empty regular expression in C:\inetpub\wwwroot\intranet\lib\plugins\bureaucracy\syntax.php on line 492
Warning: preg_replace(): Empty regular expression in C:\inetpub\wwwroot\intranet\lib\plugins\bureaucracy\syntax.php on line 492
Das Template "qm-handbuch:3_verfahrensanweisungen_und_checklisten:qds-000303_cl-fertigungsunterlagen_av" konnte nicht geladen werden. Möglicherweise existiert es nicht oder Sie verfügen nicht über die benötigten Rechte.
You have to see that i defined a template in a complete different namespace than the error-code finds. And on top If I use the form like:
<form>
action template vorlagen:templates:qds000303 "projekte:1:qds000303"
submit "Anlegen"
</form>
there is no problem anymore. It takes the right template and there is no error any more. So I think there has to be a problem with the lookup variable that is looking into another schema within the bureaucracy-form .
When I use a lookup-variable wich is looking in its' own schema than i got no error when i use it in a bureaucracy-form.
Now I don't know if it's a feature or a bug.
Best regards.