Account created on 28 February 2019, over 5 years ago
#

Merge Requests

More

Recent comments

🇮🇳India bhanu951

Seems issue summary is good. Update the code against latest head.

🇮🇳India bhanu951

Changed Target Branch to 11.x and updated latest changes as patch for backup before target branch change.

🇮🇳India bhanu951

Thanks @ longwave, @kreynen, @greggles for clarification will try to use 3.x and make the port.

🇮🇳India bhanu951

I am planning to work on this port , currently The JS library https://github.com/Valve/fingerprintjs2 redirects to https://github.com/fingerprintjs/fingerprintjs which is licensed under Business Source License 1.1 https://mariadb.com/bsl11/ is it okay to use in this module or do we need to look for alternative library.

The BSL prohibits the licensed code from being used in production — without explicit approval from the licensor.

https://fossa.com/blog/business-source-license-requirements-provisions-h...

https://www.tldrlegal.com/license/business-source-license-bsl-1-1

Does anyone has any suggestions ?

🇮🇳India bhanu951

Fixed Tests and updated depreciations.

Seems its ready for review.

🇮🇳India bhanu951

Uploading MR changes as backup patch before changing target branch.

🇮🇳India bhanu951

Uploaded MR Changes as patch before changing target.

🇮🇳India bhanu951

Updated the MR to use message

"You have used a one-time login link. You can set your new password now."

🇮🇳India bhanu951

Re-rolled patch from #108 to 11.x branch.

It still needs update hook to update new config.

🇮🇳India bhanu951

Rebased the MR #909 against 11.x branch and pushed changes.

🇮🇳India bhanu951

If a site is using 2.0.0-alpha2 is it possible to switch to the 8.x-1.7 branch which is the recommended release?

I tried this earlier and this broke functionality to skip TFA for administrators.

🇮🇳India bhanu951

Reroll of #29 and added comment as suggested in #33.

🇮🇳India bhanu951

I am not sure if it is related to this issue but Entities are not being deleted when the tests are failed.

Let's say you have created new user, new taxonomy term and new node in a test , the test is failed. Ideally all the data created should be cleaned up but it is not the case, the newly created entities are present in the database.

As a work around we need to clean up the entities in teardown manually.

Applying the patch from this issue still produces the same result.

🇮🇳India bhanu951

For compatibility I have downgraded the PHP version and merged the code.

@jibus Sure will be waiting for your feedback.

🇮🇳India bhanu951

@jibus Thanks for reporting. I downgraded the required PHP version.

Are you using this module in one of your projects ? or you just came across this module ?

I wanted to know if you have faced any issues in TFA validation after migration, in case you are using this module.

🇮🇳India bhanu951

bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

I too am also able to reproduce this by Navigating to a user with TFA (at least the trusted browser plugin), clicking on the TFA tab, and than clicking on "Configure trusted browsers" as mentioned in #7 🐛 The "tfa_trusted_browser" plugin does not exist. Needs work

🇮🇳India bhanu951

bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

Adding changes in MR as patch before rebasing to 11.x

🇮🇳India bhanu951

Added strict_types on new files and rebased to head.

🇮🇳India bhanu951

Bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

Bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 3437552-fixes-for-opt-in-for-security-review to hidden.

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 2607920-breadcrumb-render-cache-10.x to active.

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 2607920-breadcrumb-render-cache-10.x to hidden.

🇮🇳India bhanu951

> Can you specify which missing configs the theme is complaining about?

Theme is not complaining about any missing configs. But the site is not being displayed properly due to missing blocks and views.

> Are you planning on using this theme somewhere else?

I am trying to use it for my personal site. With removing references to drupalcon and Drupal Logs as it is GPL.

>This theme is not meant to be installed on any other site

Do you mean to say I can not use this theme with stripped DrupalCon References ?

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 11.x to hidden.

🇮🇳India bhanu951
  Error message
  Warning: Undefined array key "#type" in Drupal\Core\Form\FormHelper::processStates() (line 211 of core/lib/Drupal/Core/Form/FormHelper.php).
  Drupal\Core\Form\FormHelper::processStates(Array) (Line: 412)
  Drupal\Core\Render\Renderer->doRender(Array) (Line: 458)
  Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
  Drupal\Core\Render\Renderer->render(Array) (Line: 474)
  Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 44)
  __TwigTemplate_335c6caddc004ce5ce1cc6eb323c5a5a->doDisplay(Array, Array) (Line: 394)
  Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
  Twig\Template->display(Array) (Line: 379)
  Twig\Template->render(Array, Array) (Line: 40)
  Twig\TemplateWrapper->render(Array) (Line: 53)
  twig_render_template('core/themes/claro/templates/node-edit-form.html.twig', Array) (Line: 372)
  Drupal\Core\Theme\ThemeManager->render('node_edit_form', Array) (Line: 445)
  Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
  Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
  Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
  Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231)
  Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
  Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
  Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
  call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
  Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 187)
  Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
  Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
  Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
  Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
  Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
  Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
  Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
  Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
  Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
  Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to Reproduce :

Added a field visibility condition using `#states` API

  $form['body']['#states'] = [
      'visible' => [
        ':input[name="field_article_type"]' => ['value' => 14833],
      ],
    ];

    $form['field_local_video']['#states'] = [
      'visible' => [
        ':input[name="field_article_type"]' => ['value' => 14832],
      ],
    ];
   
 

Among the above fields

body --> Default Body Field

field_local_video --> Media Entity Reference Field

field_article_type --> Taxonomy term field.

🇮🇳India bhanu951

Re-rolled Patch from #133 against 11.x branch.

But there seems a test failure. Might not be related to this change. Test failure in https://git.drupalcode.org/issue/drupal-2700667/-/blob/2700667-notice-undefined-index/core/modules/file/tests/src/Functional/DownloadTest.php#L138


    1)
    Drupal\Tests\file\Functional\DownloadTest::testPrivateFileTransferWithoutPageCache
    Correctly denied access to a file when file_test sets the header to -1.
    Failed asserting that 200 is identical to 403.
    
    /builds/issue/drupal-2700667/core/modules/file/tests/src/Functional/DownloadTest.php:138
    /builds/issue/drupal-2700667/core/modules/file/tests/src/Functional/DownloadTest.php:76
🇮🇳India bhanu951

Bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 11.x to hidden.

🇮🇳India bhanu951

For anyone looking for solution here is the sample code . Basically you need to use Derivatives to create multiple blocks in Drupal 8+ .

https://git.drupalcode.org/sandbox/Bhanu951-3103712/-/blob/8.x-dev/block...

🇮🇳India bhanu951

For those who are looking for limit queue items or queue execution time, there are additional flags in drush commands to limit them.

From drush queue:run documentation page 

Run a specific queue by name.

Arguments

  • name. The name of the queue to run, as defined in either hook_queue_info or hook_cron_queue_info.

Options

  • --time-limit=TIME-LIMIT. The maximum number of seconds allowed to run the queue.
  • --items-limit=ITEMS-LIMIT. The maximum number of items allowed to run the queue.
  • --lease-time=LEASE-TIME. The maximum number of seconds that an item remains claimed.
🇮🇳India bhanu951

Bhanu951 made their first commit to this issue’s fork.

🇮🇳India bhanu951

Rebased to latest head but need to merge commits, a697018f and 78d40bad - Update /multilingual.tar.gz .

@claudiu.cristea by any chance do you remember what those changes are ?

🇮🇳India bhanu951

Thank you for your contribution. But I am currently not encouraging such low effort Novice contributions from non-novice contributors.

If you wish to make a more meaningful contribution would like to have your efforts put in issue 🐛 Fix Decoding error after migration Needs review .

🇮🇳India bhanu951

Tests failed due to missing patch utility in the docker image. Hence setting to NR again.

git check-ignore 'vendor'
> post-drupal-scaffold-cmd: cd web && patch -p1 <
../scaffold-modifications/htaccess.patch
Executing command (CWD): cd web && patch -p1 <
../scaffold-modifications/htaccess.patch
sh: 1: patch: not found
Script cd web && patch -p1 < ../scaffold-modifications/htaccess.patch
handling the post-drupal-scaffold-cmd event returned with error code 127
Failed asserting that 127 matches expected 0.
🇮🇳India bhanu951

Rerolled patch 3095214-16.patch against 11.x branch and updated web-root directory to web in all places instead of mixed docroot and web , updated patch generation git command to include --no-prefix

🇮🇳India bhanu951

Need to update guide to reflect simplesamlphp:2.x changes.
vendor/simplesamlphp/simplesamlphp/www directory is changed to vendor/simplesamlphp/simplesamlphp/public 

🇮🇳India bhanu951

Bhanu951 changed the visibility of the branch 2607920-breadcrumb-render-cache to hidden.

🇮🇳India bhanu951

Coming from google search. Here is a way to get it in Drupal 9+

$ids = \Drupal::entityQuery('user')
    ->condition('status', 1)
    ->condition('roles', 'administrator')
    ->execute();
$users = User::loadMultiple($ids);
foreach($users as $user){
    $username = $user->get('name')->getString();
    $mail =  $user->get('mail')->getString();
    $userlist[$mail] = $username;
}
🇮🇳India bhanu951

I think I have fixed the issue. Can anyone apply patch and test it.

🇮🇳India bhanu951

I think I have fixed the issue 🐛 Fix Decoding error after migration Needs review can any one test it and confirm ?

🇮🇳India bhanu951

I think we can use the below logic to validate the Legacy Accepted Code.


  /**
   * Whether the code has been used in Legacy System.
   *
   * @param string $code
   *   Entered OTP Code.
   * @param string $hash_salt
   *   Legacy Site Hash.
   * @param int $uid
   *   UID of the User.
   *
   * @return bool
   *   Returns wheter the code already used or not.
   */
  protected function alreadyAcceptedCodeInLegacySystem(string $code, string $hash_salt, int $uid): bool {

    $fields = [
      'uid',
      'module',
    ];

    $hash = hash('sha1', $hash_salt . $code);

    $legacy_code = 'legacy_tfa_accepted_code_' . $hash;

    $query = $this->connection->select('users_data', 'ud')
      ->fields('ud', $fields)
      ->condition('name', $legacy_code)
      ->condition('uid', $uid)
      ->execute();

    $result = $query->fetchAssoc();

    if (!empty($result)) {
      return TRUE;
    }

    return FALSE;

  }

We can Just plugin in the above code in the validate function and add OR condition to check legacy and current system accepted codes.

Production build 0.71.5 2024