Closed jochenklar closed 4 months ago
I have no strong opinion. Just for comparison: uri_prefix
is defined without slash.
Clarification: The inserted uri_path
is the path of the parent, e.g. page catalog/section/page
. The idea is that I only need to add "question" to get catalog/section/page/question
as uri_path
for the question. If we insert catalog/section/page/
people just need "question", but if they just hit save a question with catalog/section/page/
will be saved (which the user does not want). If we insert catalog/section/page
people need to type an addtional /
, but when they just hit save, there will be a validation error since catalog/section/page
is already the uri_path
of the page.
Clarification: The inserted
uri_path
is the path of the parent, e.g. pagecatalog/section/page
. The idea is that I only need to add "question" to getcatalog/section/page/question
asuri_path
for the question. If we insertcatalog/section/page/
people just need "question", but if they just hit save a question withcatalog/section/page/
will be saved (which the user does not want). If we insertcatalog/section/page
people need to type an addtional/
, but when they just hit save, there will be a validation error sincecatalog/section/page
is already theuri_path
of the page.
This argument supports the uri_path
without /
.
I just had the idea that, if you create a question, the
uri_path
of the page is already in the form. This PR adds this. I am not sure, if we should add the/
to the path already. If we don't just creating the element without editing will give a validation error (which is good I think), but then we always need to add the slash.