When exporting views via Features, the 'remember_roles' entry contains a row for each role on your site. On a site with 200 roles it is not necessary to store 200 lines of zeroes - the 'remember_roles' array is array_filter()ed before use anyway, so we can filter it before saving and therefore only export the selected roles.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

longwave created an issue. See original summary.

prafull.addweb’s picture

Issue tags: +views
Rob230’s picture

What is the point of remember_roles? It appears on every filter, even ones that have nothing to do with roles, and it remembers old roles that no longer exist, e.g.:

62 => 0,

Where 62 is a role that was deleted.

In every filter it appears on, the only key with a value is 2:

2 => '2',

Where 2 is the role ID of authenticated user.

I don't understand what it's meant to be saving. I can see nothing in the filter settings that it could be referring to.

Rob230’s picture

Ah I found it. When you check 'Remember the last selection' there is a hidden field that becomes visible. I don't know why it needs to export all this junk, mostly zeroes and out-of-date values, when you export a view.

Edit: deleting it from your view export doesn't seem to affect it, so it isn't needed at all.

joelpittet’s picture

Priority: Minor » Normal
Status: Needs review » Reviewed & tested by the community
Issue tags: -views

This works if you save the view after applying the patch. It would be nice if the exporting did this but I can't be 100% if we do that generically and don't know how to target specific options to alter their export output.