Attempt to fix multi value handling with placeholders#740
Open
splitbrain wants to merge 2 commits intomasterfrom
Open
Attempt to fix multi value handling with placeholders#740splitbrain wants to merge 2 commits intomasterfrom
splitbrain wants to merge 2 commits intomasterfrom
Conversation
This partly reverts and augments 131fd50 The validator call is needed to transform the given value into to proper format (eg. an array for multivalues or an array of array for multi-page values). This has to be done after applying place holders. This might also fix #729 It might also break other usecase so it needs more real world testing. Overall the bureaucracy handling is a mess, because bureaucracy is a mess. Until splitbrain/dokuwiki-plugin-bureaucracy#303 has been addressed, there is no good way to fix this.
460aa61 to
62ab667
Compare
We were applying replacements in setVal() but that is weirdly called during parsing and then gets cached. But it's also called again when the validation fails... It's all a mess. This tries to work around the issue, but I am far from sure this hits all the (edge) cases. Really without a refactoring of bureaucracy it's nearly impossible to interface cleanly with it.
Member
Author
|
setVal is called on parsing (and then cached) and later again on action submit. We should not validate on parsing as this would destroy placeholders. Placeholder do need to be applied on rendering to keep them dynamic. I pushed a commit trying to address both issues. @solewniczak could you check if this branch works with your setup? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This partly reverts and augments 131fd50
The validator call is needed to transform the given value into to proper format (eg. an array for multivalues or an array of array for multi-page values). This has to be done after applying place holders.
This might also fix #729
It might also break other usecase so it needs more real world testing. Overall the bureaucracy handling is a mess, because bureaucracy is a mess. Until splitbrain/dokuwiki-plugin-bureaucracy#303 has been addressed, there is no good way to fix this.