Problem/Motivation

Based on #343535: Enable bookmarking of AJAX views and https://www.drupal.org/node/3552223, it appears that starting with Drupal 11.3.x, the AJAX Views bookmarking functionality in the core/views module is enabled by default and cannot be disabled.

There are scenarios where disabling this functionality would be desirable. For example, a page may contain multiple View blocks with AJAX enabled and exposed filters. Because bookmarking is always enabled, each interaction can add additional query parameters to the URL. This can result in excessively long and cluttered URLs, which may be undesirable in some cases. In other situations, the bookmarking functionality may simply not be needed, and simpler URLs would be preferred.

In addition, the current bookmarking implementation has been reported to cause issues, as noted in https://www.drupal.org/project/drupal/issues/343535#comment-16579695.

Steps to reproduce

  • Create a View block with an exposed form (including at least one exposed filter) and enable AJAX.
  • Place the block on a page.
  • Apply a filter using the exposed form and observe that the URL is updated with query parameters.
  • Note that there
  • is currently no setting or configuration option to disable this behavior.

    Proposed resolution

    Allow the AJAX Views bookmarking functionality to be enabled or disabled through the View's configuration settings.

    Remaining tasks

    Issue fork drupal-3604351

    Command icon Show commands

    Start within a Git clone of the project using the version control instructions.

    Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    takkuyu created an issue. See original summary.

    takkuyu’s picture

    Title: Allow disabling of bookmarking of AJAX views » Allow disabling bookmarking for AJAX Views
    Issue summary: View changes
    cilefen’s picture

    Status: Active » Needs work
    Issue tags: -JavaScript, -views exposed filters +Needs merge request
    quietone’s picture

    Version: 11.x-dev » main
    Issue summary: View changes
    Issue tags: -Ajax
    Parent issue: #343535: Enable bookmarking of AJAX views »
    Related issues: +#343535: Enable bookmarking of AJAX views

    Hi, Issues for Drupal core should be targeted to the 'main' branch, our primary development branch. Changes are made on the main branch first, and are then back ported as needed according to the Core change policies. The version the problem was discovered on should be stated in the issue summary Problem/Motivation section. Thanks.

    ishani patel made their first commit to this issue’s fork.