Not resolving resource correctly multiple servers exist

Created on 18 May 2023, over 1 year ago

Error in canonical path within deriver class. With multiple servers, request resolves to a default server. See example below to fix

        if ($server && $server->getBackend()->getPluginId() == 'search_api_solr') {
          $server_identifier = 'solrest:server' . $server_id;
          $this->derivatives[$server_identifier] = [
            'id' => $server_identifier,
            'server_id' => $server_id,
            'label' => "Solrest server $server_label",
            'uri_paths' => [
              'canonical' => "/solrest/" .$server_id,
            ],
          ];
          $this->derivatives[$server_identifier] += $base_plugin_definition;
        }
🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇦🇷Argentina weemondo

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024