Account created on 22 October 2012, over 11 years ago
  • Developer at FFWΒ 
#

Recent comments

πŸ‡»πŸ‡³Vietnam chuyenlv

@martybfly

The module has a composer.json file and your main composer.lock file is already locked

"require": {
    "drupal/core": "^8 || ^9
} 

You can try https://github.com/mglaman/composer-drupal-lenient to fully upgrade your project to D10.

πŸ‡»πŸ‡³Vietnam chuyenlv

Hi @seanB
My patch is remove viewsreference parameter from request before added it to $view->element['#viewsreference']
The viewsreference_views_pre_view function will look like:

/**
 * Implements hook_views_pre_view().
 */
function viewsreference_views_pre_view(ViewExecutable $view, $display_id, array &$args) {
  if (!isset($view->element['#viewsreference']) && empty($view->getRequest()->query->all('viewsreference'))) {
    return;
  }

  if (!empty($view->getRequest()->query->all('viewsreference'))) {
    $view->element['#viewsreference'] = $view->getRequest()->query->all('viewsreference');
    $view->getRequest()->query->remove('viewsreference');
    // For ajax views we reset all handlers and make the view initialize again
    // to allow changes from the settings plugins.
    $view->display_handler->handlers = [];
    $view->inited = FALSE;
  }

  // Let all settings plugins alter the view.
  $viewsreference_plugin_manager = \Drupal::service('plugin.manager.viewsreference.setting');
  $plugin_definitions = $viewsreference_plugin_manager->getDefinitions();
  if (isset($view->element['#viewsreference']['enabled_settings'])) {
    foreach ($view->element['#viewsreference']['enabled_settings'] as $enabled_setting) {
      if (!empty($plugin_definitions[$enabled_setting])) {
        $plugin_definition = $plugin_definitions[$enabled_setting];
        /** @var \Drupal\viewsreference\Plugin\ViewsReferenceSettingInterface $plugin_instance */
        $plugin_instance = $viewsreference_plugin_manager->createInstance($plugin_definition['id']);
        $value = $view->element['#viewsreference']['data'][$plugin_definition['id']] ?? $plugin_definition['default_value'];
        $plugin_instance->alterView($view, $value);
      }
    }
  }
}

I verified the viewsreference parameter still exists on the URL of views Ajax.

πŸ‡»πŸ‡³Vietnam chuyenlv

I had a similar issue with the views enabled views_ajax_history module.

The path for the views_ajax_history module to exclude query parameters from the pager is not good, because we have to update all the views enabled views Ajax history.

So I created a patch to remove viewsreference parameter from request.

πŸ‡»πŸ‡³Vietnam chuyenlv

Re-roll #121 for 6.0.x, Drupal 10 and PHP 8.1

πŸ‡»πŸ‡³Vietnam chuyenlv

Updated patch at #6 to compatibility with Drupal 10.1.x and group version 8.x-1.6

πŸ‡»πŸ‡³Vietnam chuyenlv

Here is simple patch fixed this issue

πŸ‡»πŸ‡³Vietnam chuyenlv

Tested with Drupal 10 and I see some errors:
- Deprecated function: Creation of dynamic property Drupal\tablefield\Plugin\Field\FieldFormatter\TablefieldFormatter::$ModuleHandler is deprecated
- Deprecated function: Creation of dynamic property Drupal\tablefield\TableValue::$value is deprecated
I create the patch to fix these errors.

Production build 0.69.0 2024