I upgraded views from Views 3.x-7.x-alpha1 to views-7.x-3.0-rc1.zip (tried the dev version from 8.aug as well), and cannot find a way to revert override of a disaplay to default (master) values. In the older version of the views 3 UI (non overlay) there was a button "Use default".
Now in the overlay when editing i.e. overridden filter criteria, there is just choice of:
- Apply (this display)
- Cancel
- Remove
I would expect the "Use default" button here. If I select on the drop down list of the overlay window "All Displays (except overridden)" - it offers to update the default display - but the with overridden values.
Am I missing something?
Drupal 7.7, Chaos tools 7.x-1.0-rc1, searched the queue, but could not find anything.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | 1242892-default_revert.patch | 7.04 KB | dawehner |
| #25 | 1242892-default_revert_1.patch | 7.05 KB | dawehner |
| #24 | 1242892-default_revert_1.patch | 6.98 KB | dawehner |
| #23 | 1242892-default_revert.patch | 6.48 KB | dawehner |
| #22 | 1242892-default_revert.patch | 5.21 KB | dawehner |
Comments
Comment #1
dawehnerThere is now a select-box at the top, where you can choose the used display.
Comment #2
Jiri Volf commentedYes, I noticed that select box - but the problem is, that when I select "all displays" - the content of the form stays the same as it was for the overridden values - and If I click Apply - all displays - it updates the default values - loosing the original default values for all other displays. So effectively - there is no way to revert back to default values - without changing them.
Comment #3
dawehnerGood point this seems to me like a big regression.
Comment #5
stevetweeddale commentedEDIT: I'm experiencing this too. Sorry to have to re-open! Thanks for all your hard work on views!
Comment #6
dawehnerWhy open it without any informations?
Comment #7
stevetweeddale commentedApologies - I didn't have any new information to offer so I didn't bother with the 'Me too...'
I'm experiencing the same issue as the OP, and you only acknowledged it as 'big regression', after having marked it as fixed. There aren't any patches and I couldn't see anything in the git log so assumed it hasn't actually been fixed, and you left with that status inadvertently. Sorry if I missed something there!
Also apologies I can't offer a patch right now - what's the intended behaviour? That when you select 'all displays (except overridden)' the form values revert to the master? Or should still be a 'use master' button?
Comment #8
dawehnerThe select-field is the intended behaviour. This part of the ui got changed in the new ui.
Comment #9
stevetweeddale commentedSo the field values should revert to the master display values when you change the scope from "this display" to "all display's"?
Comment #10
Jiri Volf commentedIt seems to me that changing form values on the select-box change (use for all / this display(override)) could be the expected behaviour of the form. I'm however still pretty new to drupal and unfortunately far from supplying patches.
I checked how this works in views 6.2 - if I edit e.g. a field, then there is an override button - if I click it - it flips to use default. The form content remains the same, the submit buttons change to update / cancel (for an overridden setting) and update default display / cancel (for a default setting). If I want to go back to default values without overriding them in views 6.2, i first have to click use default and then cancel. Then the values go to the default without being overridden.
The cancel button in 6.2 cancels changes made to the default form, but the settings still go back to default(master) values (just by pressing the use default). But the In 7.3 it just cancels all changes, regardless of the state of the upper default / override select box.
A simple solution could be to change the behaviour of the upper select box- so it worked similar to the button in 6.2 - that means - just by pressing it, it would change the state of default / overridden. It is however imo still a little bit confusing.
So the question is what is the best approach?
Not sure - as there are two groups of settings with different behaviour:
1. fields, sort criteria, filter criteria, relations - when you override one, all others in the group get overridden too (btw - wasn't it possible in 7x alpha1 to override individual fields?, cannot remember)
2. section "other" under advanced - where individual settings can be overridden (and may be other sections)
Option for 1 - there could be an option "use default" added to "add , rearrange" control (on the main view edit page). On the overlay edit box for individual fields there could be a warning, that when updating all displays, original master vaules will be lost.
Or may be another solution: add "remove override and use master values" to the bottom line of the overlay edit box.
Still confusing - as the master display is hidden by default - so the edit form was probably meant to be used for editing master values - in which case it is logical, that on changing top select-box - values from the master display should be reloaded. But then the overridden values would have to be probably stored in db, so we could switch back.
Still confusing to me. It seems to me that master display should be visible by default, and master values should be able to be changed only there. Then there should be some override/use default button on the fields, filters, relations, sort criteria and so on, and same buttons on the individual settings. If the field is not overriden - there would be no active edit link on the settings - this would also make it easier to see what is overridden and what isn't.
... just some ideas, I hope it isn't even more confusing now, but that's my best I can contribute now...
Comment #11
brightboldI agree that in the midst of the many improvements in the new UI, this seems like a regression. I wouldn't go back to the previous toggle, but having a clear way to say that you wanted to remove overrides and use default/master values would be really useful.
Here's a use case:
So a really clear "remove overrides" option would be great.
Comment #12
bojanz commentedThe whole business with the select box needs major re-evaluation. It even managed to trip me up.
Comment #13
dawehnerLinking another issue which shows that under certain cases this feature is horrible broken #1174588: Overriding 'Display access settings' changes all displays unless 'Access control type' is also overridden
Comment #14
drupal_was_my_past commentedSubscribe
Comment #15
asciikewl commentedWhat about in the dropdown for fields/filters/... where it currently has "add" and "rearrange" add a "reset to defaults" if the fields/filters/whatever is overridden?
Because I know drupal well and I'm really having a hard time right now on a view where I have to take the fields for 8 displays back to the default values.
Comment #16
tim.plunkettIt looks like there was some confusion between #3 and #6.
It was marked fixed in #1, but then #3 says it was an actual bug, but not reopened.
#11 seems like a good explanation of the issue.
Comment #17
tim.plunkettTalked about this more with dereine in IRC. I think we're on the same page again.
In D6, the "Use default" button was on individual item edit pages, which was very confusing. An example of how it worked:
You have a default display with "Title" field and "Body" field. Your page display is overridden; "Body" is displayed as a teaser, and you've add "Updated Date". Then you decide you want to revert your "Body" field to the default, so you edit it and click the "Use default" button. Now, your "Updated Date" field is gone.
If we reintroduce the "Use default" button, I propose it only appear on the Rearrange page. When you click "Use default", all of the current display's fields will disappear and the defaults will be shown, giving you the chance to still hit cancel.
Now, the real discussion is if this should be a standalone button up by the dropdown, like it was in D6, or as a button along with Apply and Cancel at the bottom.
Also up for debate is the text of the button:
"Reset to default"
"Use default"
"Remove override"
Comment #18
dawehnerJust tagging to catch them all.
Comment #19
drewkeller commentedOk, I guess I'm not going crazy because I could not find a way to revert an overriden view back to the default.
There are two work arounds I thought of.
* Try to duplicate all of the default settings for whatever section you are trying to revert and then apply to all displays from within the display that was overridden.
* Export the view, edit the exported text to remove the overrides, then reimport the view.
Comment #20
kartagisSubscribe
Comment #21
dawehnerHere is an irc log:
Here is a first version of the patch
Comment #22
dawehnerAs this patch + test shows it does not work as expected.
Manual testing
* override the title (set a new value)
* "choose" revert to all displays and input some new title
* submit and you will see the default value
* press f5 and you will see the new title
* arg
Comment #23
dawehnerOkay you have to store the changed view in the cache.
Additional some changes according to a code review of chx.
Comment #24
dawehnerThis patch only shows the revert option on overridden sections.
Comment #25
dawehnerTim suggested to move default_revert to the bottom.
Comment #26
dawehnerUps forgot to update to the string change.
Comment #27
bojanz commentedLet's get it in.
Comment #28
dead_armWe've been using this patch on our sites, and it's a huge help. It still applies, and it'd be great to get this in.
Comment #29
dawehnerMh this change might cause problems. See the reference patch.
Same problem here.
Comment #30
dawehnerRework the status to not forget the patch.
Comment #31
dawehnerWith reference patch i mean #1199328: Add typehints and remove obsolete reference indicators for objects
Comment #32
dawehnerWith some feedback of bojanz and timplunkett i commited this patch to 7.x-3.x
Yeah one big step to 7.x-3.0
Thanks for everything helping on this issue.