๐Ÿ‡ซ๐Ÿ‡ฎFinland @ronttizz

Helsinki
Account created on 6 October 2022, almost 2 years ago
  • Drupal Developer at Druidย 
#

Merge Requests

Recent comments

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

This seems almost perfect what I would currently need in one of our project.

My suggestion is that this link could also optionally be utilising the UUID of the target node as in JSONAPI:Extras UUID link enhancer can output:
entity:node/{{contenttype}}/{{uuid}}

In the project I am currently working on, we have this need for the UUID in the links inside the text. Would it be possible to implement or could someone point me to correct way how this would be possible?

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

ronttizz โ†’ created an issue.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Thanks for the reminder. I'm trying to figure out why the tests are not passing. If you have any idea please let me know.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

ronttizz โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Tbh I am not entirely sure do I understand the whole process and issue but I tested this with Umami. The site has english and spanish out of the box. These are my findings.

I selected spanish as my admin preferred language.

For the language change block on Umami site it seems that these are using spanish

But "Umami Home Banner" block these are not translated.

Tbh, I am not sure are these in the scope of this issue.
Otherwise it seems that all the top admin nav/toolbar is respecting the admin language and they are spanish even though I am browsing the site in english.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

I downgraded to 2.0.0-beta6 applied the patch from https://www.drupal.org/project/openid_connect_windows_aad/issues/3398087... ๐Ÿ› TypeError: Cannot access offset of type string on string in openid_connect_windows_aad_openid_connect_userinfo_save() Needs work and this solved the issue with PHP version for me.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

I managed to update lcobucci/clock manually with composer update 'lcobucci/clock:3.2'

How ever lcobucci/jwt 4.2.1 is marked to support PHP ^7.4 || ^8.0, to my understanding and with online Semver checker PHP 8.3 should be supported https://jubianchi.github.io/semver-check/#/^7.4%20||%20^8.0/8.3

Not sure if anyone will find this helpful but this is my findings from our project.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

I removed the suggested line.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

I am a bit confused here. There is couple of branches but I seem to have hard time setting these up and testing them.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

I will be working on this for today. Assigning to myself.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Thank you very much for the great answer! You helped me to push me to right direction and with the help from colleagues I ended up making a custom module. Those links were big help for me! I'll try to elaborate my solution here for anyone else looking for making similar thing. 

I generated a module with `drush generate module` with a module file.

Created the filter like this: (There might be more information you can add if you want and need)

// MY_MODULE.module

<?php

/**
 * @file
 * Primary module hooks for MY_MODULE.
 */

/**
 * Implements hook_views_data().
 */
$data = [];

$data['node']['MY_MODULE'] = [
  'title' => t('title'),
  'filter' => [
    'title' => t('title'),
    'field' => 'id',
    'id' => 'MY_MODULE',
  ],
];

return $data;

`$data['node'] makes this filter content filter, for global filter you want to use 'views' instead.

Created a custom filter plugin:

// MY_MODULE/src/Plugin/views/filter/BooleanFilter.php

<?php

namespace Drupal\MY_MODULE\Plugin\Views\filter;

use Drupal\Core\Form\FormStateInterface;
use Drupal\views\Plugin\views\filter\FilterPluginBase;

/**
 * Filter content.
 *
 * @ingroup views_filter_handlers
 *
 * @ViewsFilter("MY_MODULE")
 */
class BooleanFilter extends FilterPluginBase {
  /**
   * {@inheritdoc}
   */
  protected function valueForm(&$form, FormStateInterface $form_state) {
    $form['value'] = [
      '#type' => 'select',
      '#title' => $this->t('Title'),
      '#options' => [
        'both' => $this->t('Both True'),
        'boolean_1' => $this->t('Boolean 1 true'),
        'boolean_2' => $this->t('Boolean 2 true'),
        'neither' => $this->t('Neither true'),
      ],
      '#default_value' => $this->value,
    ];
  }

  /**
   * {@inheritdoc}
   */
  public function query() {
    $this->ensureMyTable();
    $boolean_1 = 'field_boolean_1';
    $boolean_2 = 'field_boolean_2';
    $operator = '=';

    $this->query->addField("node__{$boolean_1}", "{$boolean_1}_value");
    $this->query->addField("node__{$boolean_2}", "{$boolean_2}_value");
    $boolean_1_value = NULL;
    $boolean_2_value = NULL;

    switch ($this->value[0]) {
      case 'both':
        $boolean_1_value = 1;
        $boolean_2_value = 1;
        break;
      case 'boolean_1':
        $boolean_1_value = 1;
        $boolean_2_value = 0;
        break;
      case 'boolean_2':
        $boolean_1_value = 0;
        $boolean_2_value = 1;
        break;
      case 'neither':
        $boolean_1_value = 0;
        $boolean_2_value = 0;
        break;
    }
    $this->query->addWhere($this->options['group'], "node__{$boolean_1_value}.{$boolean_1_value}_value", $boolean_1_value, $operator);
    $this->query->addWhere($this->options['group'], "node__{$boolean_2_value}.{$boolean_2_value}_value", $boolean_2_value, $operator);
  }
}

Then I added this filter to my view and voilรก now I have one dropdown filter that can filter both of these values from one dropdown.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

For me similar happened on our Azure based testing environment and `drush cr` couple of times solved the situation. Problem itself might be on Azure end but I was wondering this also for a while.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Tested patch #3 and at least alone it is not working.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Heres a patch which applies to v1.21. Its basically just a reroll of the #4

Could not test against v1.21

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Faced the same problem as jeffreymattson.

Hopefully next release will come soon so we don't need to use dev version on prod for long.

I will take a look if I am able make a patch for the version 1.21.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

If you want to make a column that can be sorted alphabetical by taxonomy term label you need to add a field that is relating on the relationship of the taxonomy term and the field is "Taxonomy term: Name"

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

This saved me a lot! Thank you sir!

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

Patch #30 did not solve the problem, it allows the form to be sent but title and URL are still required. Any updates on this one?

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

This issue was produced by limiting the tags which can be used and for some reason the tags got changed when trying to add image via IMCE file manager.

Adding an image with CKEditor 5 built in Insert Image plugin and using IMCE works fine.

Closing this issue.

๐Ÿ‡ซ๐Ÿ‡ฎFinland ronttizz Helsinki

ronttizz โ†’ created an issue.

Production build 0.71.5 2024