Account created on 29 August 2014, about 10 years ago
#

Merge Requests

Recent comments

🇳🇱Netherlands Krilo_89

HI @plopesc, indeed!

Migrate Tools had a security update, therefore Path Redirect Import should also be updated, that's correct.

But I will change the version for this issue, because this patch will not work with 2.0.8 and later.

🇳🇱Netherlands Krilo_89

@rachel_norfolk and @ressa, I'm missing the most important thing of the Stamen update and that's the API Key. The whole point of the switch to stadia.com, is that you need to register and retrieve an API Key to use the maps in Drupal.
Right now it works only on localhost and I don't think we only build local websites here ;).

The best way is to add an extra field in the backend for the API key. And 'navionics' is already doing that, so why don't do the same?

🇳🇱Netherlands Krilo_89

Combined everything into one patch, because now no one can use it. We tested the patch internally and therefore the status is set to RTBC.

Suggestion to maintainer is to remove the old redundant patches in the root of the project, because they are already applied. If you need a second maintainer to help you, please let us know.

🇳🇱Netherlands Krilo_89

@akrrev, indeed! I discovered the same issue.

Maybe @JeroenT can create a new alpha4 tag with the newest commits? The only additions are the readme file and the fix for the 'require' option.

🇳🇱Netherlands Krilo_89

For people reading this and not finding a good example, I just posted one here: https://www.drupal.org/project/search_api_solr/issues/3203375#comment-14... Introduce events and deprecate hooks Fixed

@mkalkbrenner, don't you think there could be some examples inside an examples folder? Just lik the hook_event_dispatcher module does? See: https://git.drupalcode.org/project/hook_event_dispatcher/-/tree/3.x/exam...

🇳🇱Netherlands Krilo_89

@SomebodySysop, I'm reading this and seeing your example, I'm backing the idea to put in some examples on the module.

The reason your code isn't working, is because:

return [
   'SearchApiSolrEvents::POST_EXTRACT_RESULTS' => 'processResults'
];

Must return an array like: Class => 'function'. You are returning a 'string' => 'string', which isn't working.

I had to use an PostFieldMappingEvent and did it like so:

services.yml file:

services:
  custom_module.event_subscriber:
    class: Drupal\custom_module\EventSubscriber\PostFieldMappingEvent
    tags:
      - { name: event_subscriber }

My PostFieldMappingEvent.php file:


namespace Drupal\custom_module\EventSubscriber;

use Drupal\search_api_solr\Event\SearchApiSolrEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
 * Custom module event subscriber.
 */
class PostFieldMappingEvent implements EventSubscriberInterface {

  /**
   * {@inheritdoc}
   */
  public static function getSubscribedEvents(): array {
    return [
      SearchApiSolrEvents::POST_FIELD_MAPPING => 'alterSolrFieldNames',
    ];
  }

  /**
   * Change the Solr field names.
   *
   * @param \Drupal\search_api_solr\Event\PostFieldMappingEvent $event
   */
  public function alterSolrFieldNames(PostFieldMappingEvent $event): void {
    // Your code here
  }

}

I hope this makes it easier to understand, but maybe we still need to add some examples. Not everyone knows how to use Events..

Production build 0.71.5 2024