Problem/Motivation

Currently Views uses id() to get the machine name. Maybe we want start an extended program for eradication of this rudiment. Related post.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#5 2791545-5-stable.patch620 bytesAnonymous (not verified)
#5 2791545-5-classy.patch620 bytesAnonymous (not verified)
#5 2791545-5-views_ui.patch21.75 KBAnonymous (not verified)
#5 2791545-5-views.patch22.57 KBAnonymous (not verified)
#2 2791545-1.patch1.36 KBAnonymous (not verified)

Comments

Anonymous’s picture

vaplas created an issue. See original summary.

Anonymous’s picture

StatusFileSize
new1.36 KB
dawehner’s picture

Thank you for creating a new issue.

There seems to be a couple of more places which uses "view name":

$ ag "view name"
modules/views/config/schema/views.entity_reference.schema.yml
13:          label: 'View name'

modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php
261:    // Split view name and display name from the 'view_and_display' value.

modules/views/src/Views.php
299:   *   - key: view name and display id separated by ':', or the view name only.

modules/views/templates/views-view.html.twig
8: * - css_name: A css-safe version of the view name.

modules/views/tests/modules/views_test_data/templates/views-view--frontpage.html.twig
8: * - css_name: A css-safe version of the view name.

modules/views_ui/js/views-admin.js
34:   * In the add view wizard, use the view name to prepopulate form fields such
41:   *   view name.
52:      // prepopulated with the view name - no regular expression needed.
69:      // Prepopulate the path field with a URLified version of the view name.
80:      // Populate the RSS feed field with a URLified version of the view name,
98:   * Prepopulates a form field based on the view name.

modules/views_ui/src/Controller/ViewsUIController.php
121:      // Link each view name to the view itself.

modules/views_ui/src/Tests/DefaultViewsTest.php
100:    $this->assertUrl("admin/structure/views/view/$random_name", array(), 'The custom view name got saved.');

modules/views_ui/src/Tests/DisplayFeedTest.php
41:   *   The view name to check against.

modules/views_ui/src/Tests/ReportFieldsTest.php
51:    $this->assertRaw('>test_field_field_test</a>', 'View name appears correctly');

modules/views_ui/src/Tests/WizardTest.php
39:    $this->assertText('View name cannot be longer than 255 characters but is currently 256 characters long.');

modules/views_ui/src/ViewDuplicateForm.php
29:      '#title' => $this->t('View name'),

modules/views_ui/src/ViewAddForm.php
64:      '#title' => $this->t('View name'),

modules/views_ui/src/ViewListBuilder.php
129:        'data' => $this->t('View name'),
200:      '#placeholder' => $this->t('Filter by view name or description'),
205:        'title' => $this->t('Enter a part of the view name or description to filter by.'),

modules/views_ui/src/ViewEditForm.php
686:          'title' => $this->t('Edit view name/description'),

modules/views_ui/tests/src/FunctionalJavascript/ViewsWizardTest.php
40:    // Set a view name, this should be used to prepopulate a number of other

themes/classy/templates/views/views-view.html.twig
8: * - css_name: A css-safe version of the view name.

themes/stable/templates/views/views-view.html.twig
8: * - css_name: A css-safe version of the view name.

Note: Many of them are userfacing, we shouldn't change those, but some of the comments etc. might better be changed, like the one in the templates.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Anonymous’s picture

StatusFileSize
new22.57 KB
new21.75 KB
new620 bytes
new620 bytes

I'm not happy to have opened this issue :) All these corrections may only hurt other people working on really important tasks now. But I tried not to touch the key "view_name" and comments to it. And the only change local variables. What do you think, may be postpone the issue?)

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
larowlan’s picture

Category: Bug report » Task
Issue tags: +Bug Smash Initiative

This feels like a task more than a bug

quietone’s picture

Title: Update documentation for Views::getViewsAsOptions() » Use view_id, view_name consistently and update docs
Issue summary: View changes
Issue tags: +Needs issue summary update

Changing title as this is changing variable names as well as documentation and doesn't seem to touching more files than just Views.php

lendude’s picture

Hmmm, I'd be against doing #5 were we change all the variable names. Just updating the docs like #2 seems like the way to go here.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Active » Closed (outdated)

The views subsystem maintainer recommends that the docs are changed but not the variable names. That doc were updated in #2689923: hook_views_pre_view incorrect documentation example, making this issue outdated.

Cheers