I wanted to note here that if you have an EVA display on a view, that you cannot use the Summary option contextual filters, due to a limitation in Views it just doesn't work. There's a bug report for core for this (#3054944: Base path for attachment summary view broken).

Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Issue summary: View changes
damienmckenna’s picture

This could be handled in EVA by adding DisplayRouterInterface.

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new7.26 KB

WIP patch that changes Eva to extend PathPluginBase instead of DisplayPluginBase.

damienmckenna’s picture

Status: Needs review » Needs work

While #4 makes it possible to build a glossary display without a WSOD, the URLs on the links are wrong.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new6.63 KB
new4.1 KB

The patch above didn't show any output; in my efforts to fix the path problems resulted in my uploading the wrong changes.

This shows the output, but though the path problem still exists.

damienmckenna’s picture

FWIW here's the JS code I used with the patch above to make the display load via AJAX, because the standard Views AJAX logic wasn't being triggered:

(function ($, Drupal, drupalSettings) {
  'use strict';

  /**
   */
  Drupal.behaviors.LandingPageViewBySubject = {
    attach: function (context, settings) {
      $('.PARENTCLASS .view .views-summary > a', context).on('click', function(e) {
        e.preventDefault();
        var the_letter = this.innerText;
        var the_context = context;
        $.ajax({
         'url': Drupal.url('views/ajax'),
         'type': 'POST',
         'data': {
           'view_name': 'VIEWNAME',
           'view_display_id': 'DISPLAYNAME',
           'view_args': the_letter,
          },
         'dataType': 'json',
         'async': false,
         'success': function (response)  {
           if (response[3] !== undefined) {
             var viewHtml = response[3].data;
             // Remove previous results and add the new ones.
             $('. PARENTCLASS > .views-element-container').html('');
             $('. PARENTCLASS > .views-element-container').append(viewHtml);
    
             // Attach Latest settings to the behaviours and settings. 
             // it will prevent the ajax pager issue
             Drupal.settings = response[0].settings;
             drupalSettings.views = response[0].settings.views;
             Drupal.attachBehaviors(the_context, Drupal.settings);
           }
         }
        });
        return false;
      });
    }
  };
})(jQuery, Drupal, drupalSettings);

(adjust PARENTCLASS, VIEWNAME and DISPLAYNAME as appropriate.

vitaliyb98’s picture

I investigated this issue, and in my opinion, it cannot be resolved within this module, as it's a global problem affecting all display handlers that don't extend PathPluginBase.

Personally, I believe that for displays not extending PathPluginBase, the summary option for arguments should not be available at least until this is fixed or a better solution is found.

vitaliyb98’s picture

Status: Needs review » Closed (won't fix)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.