Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Apr 2015 at 11:43 UTC
Updated:
19 Oct 2015 at 05:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehner@JinX-Be
Thank you for reporting this issue!
Do you want to give it a try in fixing it?
Comment #2
JinX-Be commented@dawehner
Ok, I'll give it a go.
Comment #3
JinX-Be commentedDouble post sorry
Comment #4
JinX-Be commentedComment #5
JinX-Be commentedComment #7
JinX-Be commentedChanged the code and tested locally.
Had to change one of the tests so that specify validation was true where there was a validator set (as mentioned in this bug).
Comment #8
JinX-Be commentedChanged the patch.
Now I don't set the basic validation to none when you save the view, but in the rendering.
So if you uncheck the 'specify validation criteria' and afterwards you check it again, your choice is still saved.
Comment #11
upchuk commentedLet's see if this fixes the errors.
Comment #12
upchuk commentedUnassigning Jinx-BE since he is having connection issues and can't do it himself :)
Comment #13
geertvd commented$this->options['specify_validation']is supposed to be a boolean, I never really passed that if statement. So changed it to useempty()instead.In addition I found some test views that didn't include the
specify_validationoption in their yml file, that seems wrong since those views did have a validation option but specify_validation would default to FALSE.I also added test coverage.
Comment #18
geertvd commentedMissed one, some of these test views are really weird.
Comment #19
upchuk commentedAfter speaking to @dawener, we should take care of this at the submit level. When the argument options are submitted, we reset the validate options if the checkbox is unchecked.
Let's see if any tests break...and we also need to write tests for this.
The patch is small and started from scratch.
Comment #20
upchuk commentedAnd the patch...
Comment #21
dawehnerYeah that approach is sooo much better, IMHO, but yeah, as you know, westill need some testcoverage.
Comment #22
upchuk commentedHere's a test patch i've been working on...though I can't seem to get it working right at the end..the second postForm doesn't seem to save the changes in the handler and view..
Comment #25
geertvd commentedJust using a boolean there works better for me.
Comment #28
lendudeManually tested this. Followed the steps to reproduce and the issue still exists. After applying the patch and resaving the argument, the issue is fixed.
Little bit of nitpicking, looks good to me otherwise. And we have tests, yay!
It's the 'Specify validation criteria' checkbox. And it should be 'is not checked'.
Bit misleading, it doesn't test the actual functionality, it only tests setting the options. But since it's an UI test, that may be inferred.
See 1, should be the 'Specify validation criteria' checkbox
Comment #29
dawehnerShould we also truncate the validation options?
Comment #30
upchuk commentedComment #31
upchuk commentedAddressed #28 and #29.
Comment #33
upchuk commentedHere we go. This should fix it.
Comment #34
dawehnerMaybe adding a quick comment why this is needed would be nice!
Seems pointless here to add it
let's just use protected, its how we roll
Comment #37
upchuk commentedHere we go. The Exception thing was added by my PHPStorm :P
Comment #38
lendudeAll issues raised so far seem addressed, looks good to me.
Comment #40
webchickCommitted and pushed to 8.0.x. Thanks!