πŸ‡ΊπŸ‡ΈUnited States @codesquatch

Account created on 19 October 2016, about 8 years ago
#

Merge Requests

Recent comments

πŸ‡ΊπŸ‡ΈUnited States codesquatch

It would appear the patch fails to work on any version of 10.3.*. I didn't bother testing 10.2 and below.

πŸ‡ΊπŸ‡ΈUnited States codesquatch

Ahhh, thank you! I see now, that makes sense. Appreciate you dropping the code example too, you da bomb!

πŸ‡ΊπŸ‡ΈUnited States codesquatch

Ah, thanks for the response. Oh of curiosity, how would one use this forked version on a production environment? I’m used to using cweagans patches in composer to maintain things of this nature.

πŸ‡ΊπŸ‡ΈUnited States codesquatch

Unfortunately #112 is failing against 10.2 :/

πŸ‡ΊπŸ‡ΈUnited States codesquatch

@MukhtarM It could have been an oversight on the implementing developer, or perhaps an assumption that the update would always file since the module would only be supported on D8/9? Either way, installing the module on fresh D9 and D10 (with patch) site throws the error for me that is in the description of the bug. It was causing a headache in situations where the module is a dependency for a distribution.

πŸ‡ΊπŸ‡ΈUnited States codesquatch

I just ran across the issue as well so I created a patch for it.

To answer your additional question @kaelteschutzgebiet, you'd need to add it into the User Profile page yourself via an alter hook or preprocess hook in your theme. This is how we've done it:

/**
 * Implements hook_ENTITY_TYPE_view_alter() for user entities.
 *
 * This function adds the user's API Token to their profile form.
 */
function modulename_user_view_alter(array &$build, UserInterface $account, EntityViewDisplayInterface $display): void {
  // Display API Token for current user.
  if ($account->id() === \Drupal::currentUser()->id()) {
    $token = \Drupal::database()
      ->select(Token::TABLE_NAME, 't')
      ->fields('t', ['public_token'])
      ->condition('user_id', $account->id())
      ->execute()
      ->fetch();

    $build['api_token'] = [
      '#type' => 'item',
      '#title' => t('API Session Token'),
      '#label_attributes' => ['class' => ['label']],
      '#plain_text' => $token?->public_token ?? '',
    ];
  }
}
πŸ‡ΊπŸ‡ΈUnited States codesquatch

The package has been updated to properly set all module dependencies. This change has been added to https://www.drupal.org/project/wsdl_docs/releases/4.0.0 β†’

Production build 0.71.5 2024