Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/218386
Change subject: Fix selection of snak values (to not select invalid values) ...................................................................... Fix selection of snak values (to not select invalid values) Don't select and save snak value when it has become invalid. Without this check, statementview is proceeding to save with a stale value, even after the value became invalid (e.g. user is continuing to select in entity selector). As far as I can tell, this seems to be the problem in T98471. Bug: T98471 Change-Id: If140ce69d5ab6bc52c8d7a9644490f5dabce75ff --- M view/resources/jquery/wikibase/jquery.wikibase.statementview.js 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/86/218386/1 diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js index c1405fb..b57e5f1 100644 --- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js +++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js @@ -769,6 +769,12 @@ * @return {boolean} */ isValid: function() { + if( this.$mainSnak && this.$mainSnak.data( 'snakview' ) ) { + if( !this.$mainSnak.data( 'snakview' ).isValid() ) { + return false; + } + } + if( this._qualifiers ) { var snaklistviews = this._qualifiers.value(); -- To view, visit https://gerrit.wikimedia.org/r/218386 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If140ce69d5ab6bc52c8d7a9644490f5dabce75ff Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude <aude.w...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits