Account created on 7 January 2011, almost 14 years ago
#

Merge Requests

More

Recent comments

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

jamesgrobertson β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

I believe it uses that fork for psr/log:^3.0 compatibility. It looks like that dependency has been updated in the original package, so we could probably change it back to akamai-open/edgegrid-client.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

Scratch that, the 4.0.x-dev branch works correctly, apologies!

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

This module also has a dependency on Drush 10, but Drush 10 is not supported for Drupal 10 (see https://www.drush.org/12.x/install/#drupal-compatibility).

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

jamesgrobertson β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

I created a merge request for #3299343-3: Automated Drupal 10 compatibility fixes β†’ and the necessary updates to the .info.yml file.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

jamesgrobertson β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

In #3276441-15: Add feature sending drupal log to aws cloudwatch β†’ the message couldn't be altered in the event. I've changed it so that the message that gets sent to CloudWatch is the one returned from the event.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

This is the only thing that ended up working for me:

  type:
    plugin: if_condition
    source: page_category
    condition:
      plugin: or
      conditions:
        -
          plugin: has_element
          condition: equals(dining)
        -
          plugin: has_element
          condition: equals(services)
        -
          plugin: has_element
          condition: equals(shopping)
    do_get: constants/stores
    else_get: constants/basic_page

I never could get the in_array plugin to work. It seems backwards to me, like $source and $value should be switched as parameters when in_array() is actually called in the plugin. It always evaluated to FALSE, no matter what I did. I was passing an array as both $needle and $haystack, and it might just be PHP that is behaving differently than I expect.

Anyway, thanks for all your help. I have something that works, so you can close this if you wish!

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

Thanks for your help! I will try that and see what happens.

I tried the in_array plugin, but basically I need to change the bundle of a node based on whether the post contains the term "dining" OR "services" OR "shopping". Perhaps I'm also doing something wrong with that one, but it seems like in_array is an "AND" situation (i.e. dining AND services AND shopping)?

I can always switch to using the or plugin too. I was just trying to make it a little easier to read and perhaps contribute it back, in case someone else needed something similar.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

Yes, the file is named ArrayIntersect.php

This is the relevant part:

  type:
    plugin: switch_on_condition
    source: page_category
    cases:
      -
        condition:
          plugin: array_intersect
          value:
            - dining
            - services
            - shopping
        default_value: stores
      -
        condition: default
        default_value: basic_page
πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

Yes, it's enabled :D It's a fair question, because I have done that before.

namespace Drupal\custom_module\Plugin\migrate_conditions\condition;

use Drupal\migrate_conditions\Plugin\SimpleComparisonBase;

/**
 * @MigrateConditionsConditionPlugin(
 *   id = "array_intersect"
 * )
 */
class ArrayIntersect extends SimpleComparisonBase {

  /**
   * {@inheritdoc}
   */
  protected function compare($source, $value) {
    // TODO: Implement compare() method.
  }

}

Thank you!

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

Checked the module with Rector and it only found issues in the .info.yml files. Hope this merge request helps!

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

jamesgrobertson β†’ made their first commit to this issue’s fork.

πŸ‡ΊπŸ‡ΈUnited States jamesgrobertson

I've added a hook to alter the messages before they get sent to CloudWatch. I had a need to add additional data to the message that wouldn't make sense to log to messages stored in the database. Feedback is welcome!

Production build 0.71.5 2024