cosmocode/dokuwiki-plugin-struct

Dot (.) in schema field name allowed?

Opened this issue · 6 comments

I used a dot in a schema field name, e.g. xxx aka. yyy. I found, that struct inline editor did not work on this field. It did again, after I removed the dot. However, I couldn't find any documentation on naming convention for schema field names.

annda commented

Dot in a field name should work. I just tested ii and the inline editor in aggregations works. Can you provide more information? Field type? Is is a simple aggregation?

Sorry, I cannot reproduce this bug myself, anymore. Nevermind.

I found the bug again. And, now I did more testing. (I tested this with current versions of dokuwiki and struct. I tested struct aggregation table and struct aggregation editor with fieldtype text.)

If dot occurs in field name like so: No. of items, inline editor does not show up on that field in struct serial editor upon doubleclick. However if field name is items and label is No. of items, inline editor works as expected.

Also filter breaks, if field name with (.) or label with (.) is used in the filter instruction.
If underlying schema field name is free of (.) and is used for the filter instruction, instead of label with (.), filter works as expected.

This should be mentioned in the documentation or solved in the code.

We can not reproduce any problems with inline editing. When filtering, you need to give the full qualified name (with schema):

---- struct table ----
schema: test
cols: %pageid%, *
filter: test.text.foo ~ *aaa*
----

Seems to work, maybe it would be worth to update the documentation to recommend against using dots in field names.

Please add a reproducible example if you still have problems.

I edited the docs, accordingly. Cheers!