it looks like a typo in the code.
in views_display_switch.module on line 73

if ($request_mode === 'collection_table') {
      $view->setDisplay('collection_table');
    }

maybe it should be like this:

if ($request_mode === $display_id) {
      $view->setDisplay($display_id);
    }
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

bonzik created an issue. See original summary.

luksak’s picture

Oops, that looks like project specific code that slipped in.

Do you want to create a fork send me a merge request with that fancy green button above?

luksak’s picture

Status: Active » Fixed

Thank you! The fix is merged and I released a new version.

luksak’s picture

Somehow the release takes longer than usual... I pushed it to 1.1.x and created the 1.1.1 tag: https://git.drupalcode.org/project/views_display_switch/-/commit/6c047c3...

luksak’s picture

Version: 1.1.0 » 1.1.x-dev

I just fixed the release with the d.o infra team: https://www.drupal.org/project/views_display_switch/releases/1.1.1

bonzik’s picture

Priority: Normal » Critical
Status: Fixed » Active

it looks like I made a critical error in logic

  • bonzik committed 8d1c6a8 on 1.1.x
    Issue #3189766 by bonzik: Typo in code
    
luksak’s picture

Status: Active » Fixed

Thanks! Sorry, I didn't properly test your merge request. I just made a release: https://www.drupal.org/project/views_display_switch/releases/1.1.2

Status: Fixed » Closed (fixed)

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