Comments

mstrelan’s picture

Title: Removing a field from a display can be confusing if the filter is not already overridden. » Removing a field from a display can be confusing if the field is not already overridden.

Title should read "field", not "filter".

dawehner’s picture

The code at the top of views_ui_standard_submit() has to be executed on views_ui_config_item_form_remove as well.

Just to write down for the person who fixes this.

sachbearbeiter’s picture

subscribe

merlinofchaos’s picture

Title: Removing a field from a display can be confusing if the field is not already overridden. » Remove button does not respect changing of the override select
Category: feature » bug

This is an artifact of changing override from a button to a select, it looks like. This is somewhat related to #1174070: Improve UI for "Apply (this display)" though it is not actually the same thing, but it's a similar thing that wasn't, unfortunately, well considered in the new UI.

dawehner’s picture

Status: Active » Needs review
StatusFileSize
new4.82 KB

This patch would work in theory BUT the problem is that form_state['values'] is pretty much empty in views_ui_config_item_form_remove

Any idea what the reason could be?

dawehner’s picture

Perhaps views does something special with #validate or #limit_validation_errors

sachbearbeiter’s picture

does somebody has an solution?

dawehner’s picture

Everytime you write a comment like this in the issue queue two kittens die.

delta’s picture

subscribe i have the same problem

dawehner’s picture

@delta, @sachbearbeiter
You subscribed here so you should read this via mail :) Please test the patch!
If you think it's important, as you did because you posted something here, please test the patch.

mstrelan’s picture

Status: Needs review » Needs work

The patch doesn't work, not following the exact steps of the OP anyway.

dawehner’s picture

Issue tags: +override-problem

Just tagging to catch them all.

dpolant’s picture

subscribe

dawehner’s picture

Feel free to look at the other issues with the same tag.

dawehner’s picture

In general this patch doesn't apply at the moment so there is work todo.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new1.74 KB

Here is a rerole of the patch.

filijonka’s picture

Hi

I tested the patch and it didn't seem to work; same problem occur.
I'll take a closer look to the code later on today or tomorrow.

the question I'm thinking is: should this really even be possible? Should an admin be able to set it to override and therefor expect it to be overriden before saved?

filijonka’s picture

StatusFileSize
new2.65 KB

I made the same changes that the patch above + changed in views_ui_standard_override_values

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

#16 didn't work, but #18 works perfectly.
As long as the s/values/input in the middle hunk is okay, this is good to go. I'm not 100% sure about that change, but it seems reasonable.

dawehner’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.17 KB

The problem is: why is input required here. Well in fact you can validate the override part and everything is fine.

Awesome! Thanks earl!

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

I really need to learn more about #limit_validation_errors. This also works, and makes more sense.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed

YEAAAH

Release feels pretty close.

filijonka’s picture

please feel free to explain this more in detail, eager to learn

dawehner’s picture

Okay: if you have a #limit_validation_errors on a submit button you can limit the form elements which are validated.

Only validated form elements set values to $form_state['values']

So we need the form elements from form $form['override'] so we only validate this values.

filijonka’s picture

hi

a big aha from me :) A way smarter and more correct solution than the one I gave.

thanks for your time

dawehner’s picture

No thank you for providing an initial fix :) This leads to the idea how to fix it perfect.

Automatically closed -- issue fixed for 2 weeks with no activity.