🇮🇹 Tezze sul Brenta, VI
Account created on 30 July 2013, over 11 years ago
#

Merge Requests

More

Recent comments

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

In this case you may add the `Drupal\Core\DependencyInjection\DependencySerializationTrait` to serialize the injected object, and you will have it in the submitForm() method.

class YourForm extends FormBase {

  use DependencySerializationTrait;

   // The rest of your code.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

robertoperuzzo changed the visibility of the branch 3436938-add-back-support to hidden.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@noemi I did some changes to the README.md, could you patch your merge request with this patch ? (because I tried to push it but I don't know why I don't have the permissions).

Thank you.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@lussoluca I'm not able to fix the phpstan error

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ --------------------------------------------------------------------- 
  Line   src/Attribute/EmbeddingModel.php                                     
 ------ --------------------------------------------------------------------- 
  32     Drupal\search_api_typesense\Attribute\EmbeddingModel::__construct()  
         does not call parent constructor from                                
         Drupal\Component\Plugin\Attribute\Plugin.                            
 ------ --------------------------------------------------------------------- 
 [ERROR] Found 1 error  

Any advice?

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Hi @francesco81rs, sorry for the delay. Could you test the attached patch ? Thank you.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I applied the patch MR 5633 in a Drupal Commerce project (D10.0.11) and I have some problems running our custom Kernel tests. In particular, when we create a commerce_order sample containing a couple of order_items the test fails with the message "Test was run in the child process and ended unexpectedly".

Debugging with xDebug I get the message "Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames".

I think it is related to the double reference between order and order_item:
1. in the order we have the entity reference to the order_items

$fields['order_items'] = BaseFieldDefinition::create('entity_reference')
      ->setLabel(t('Order items'))
      ->setDescription(t('The order items.'))
      ->setCardinality(BaseFieldDefinition::CARDINALITY_UNLIMITED)
      ->setSetting('target_type', 'commerce_order_item')
      ->setSetting('handler', 'default')
      ->setDisplayOptions('form', [
        'type' => 'inline_entity_form_complex',
        'weight' => 0,
        'settings' => [
          'override_labels' => TRUE,
          'label_singular' => t('order item'),
          'label_plural' => t('order items'),
          'removed_reference' => 'delete',
        ],
      ])
      ->setDisplayOptions('view', [
        'type' => 'commerce_order_item_table',
        'weight' => 0,
      ])
      ->setDisplayConfigurable('form', TRUE)
      ->setDisplayConfigurable('view', TRUE);

2. in the order_item we have the entity reference to the order

    // The order backreference, populated by Order::postSave().
    $fields['order_id'] = BaseFieldDefinition::create('entity_reference')
      ->setLabel(t('Order'))
      ->setDescription(t('The parent order.'))
      ->setSetting('target_type', 'commerce_order')
      ->setReadOnly(TRUE);

Probably, the recursive walk in the patch

        array_walk_recursive($value, function (&$item) {
          if (is_bool($item)) {
            $item = (int) $item;
          }
          if (is_numeric($item)) {
            $item = (string) $item;
          }
        });

drives crazy the order creation.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

This issue has been fixed with the current version 1.0.x-dev.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

It was my fault, I didn't save the processors' index (/admin/config/search/search-api/index/articles/processors) before running the indexing.
The "Server index status" is correct.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

The drush command drush sapi-ts does not exist anymore, but I can't test the index status because the indexing process is stuck at the initialization.

I'm using the demo_umami profile and these configs:

search_api.index.articles.yml

uuid: 399ff165-efed-4f19-8fa6-92996fcb4bc8
langcode: en
status: true
dependencies:
  config:
    - search_api.server.typesense_test
  module:
    - node
    - search_api_typesense
    - search_api
id: articles
name: Articles
description: ''
read_only: false
field_settings:
  title:
    label: Title
    datasource_id: 'entity:node'
    property_path: title
    type: typesense_string
    dependencies:
      module:
        - node
datasource_settings:
  'entity:node':
    bundles:
      default: false
      selected:
        - article
    languages:
      default: true
      selected: {  }
processor_settings:
  add_url: {  }
  aggregated_field: {  }
  custom_value: {  }
  entity_type: {  }
  language_with_fallback: {  }
  rendered_item: {  }
  typesense_schema:
    all_fields: false
tracker_settings:
  default:
    indexing_order: fifo
options:
  cron_limit: 50
  index_directly: true
  track_changes_in_references: true
server: typesense_test

search_api.server.typesense_test.yml

uuid: b2c1e11d-a383-4c9d-acf8-87ac86d553a9
langcode: en
status: true
dependencies:
  module:
    - search_api_typesense
id: typesense_test
name: 'Typesense test'
description: ''
backend: search_api_typesense
backend_config:
  admin_api_key: ddev
  nodes:
    -
      host: typesense
      port: '8108'
      protocol: http
  retry_interval_seconds: '2'
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I temporarily fixed in my project defining my custom plugin class

class AutocompleteFiltersString extends ViewsAutocompleteFiltersString {

  /**
   * {@inheritdoc}
   */
  public function valueForm(&$form, FormStateInterface $form_state): void {
    if (
      empty(array_filter($this->view->args))
      && isset($this->view->argument['store_id'])
    ) {
      $this->view->args = [(int) $this->view->argument['store_id']->getValue()];
    }

    parent::valueForm($form, $form_state);
  }

}
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

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

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

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

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Thank you so much @urvashi_vora and I like your iubenda-logo-retouch.png. I was wondering if you could replace the old 'i' with the new one in my comment #3. It would be awesome.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@fadeslayer as the Multidomain Google Analytics , I think it would be better to create a new module or a sub-module that manage the multi-domain behaviour. As a matter of fact the Domain is a contrib not a core module, so considering the test and the experience you have with the two modules Domain and Multidomain Google Analytics, you could propose a solution on which we can work together.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@fadeslayer if I have correctly understand there are 2 issue here:

  1. if I deny consent after allowing cookies, they are not deleted automatically, though
  2. Iubenda code is embedded in page but GA cookies are set before, as if Iubenda script "comes late"

I think they are two behaviours you should better explain in two separated issue using the "issue template" that propose the following paragraphs

Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Here is the new logo

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I found this SVG version that seems to be the latest version; so I propose to use this one.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

robertoperuzzo created an issue.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Found, it's my fault! I didn't see the "Enable Text completion" checkbox in the CKEditor 5 plugin settings.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

The "Method Not Allowed (Allow: POST)" works as designed, but I don't understand why the dropdown menu still remains hidden.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Looking into the repo the line 744 seems to be correct.

Probably it is something regarding my Drupal installation. I look deeper.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

The MR !5 patch works locally using the @luenemann advice, but it doesn't work in my CI/CD pipeline because we use the standard --prefer-dist flag in composer install command.

So, how can I fix this MR?

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@luenemann I run you composer reinstall command, but the MR !5 still doesn't apply.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Patch #11 also needs some work to be compatible with S3 File System . I'm getting this error

Drupal\entity_print\Asset\AssetRenderer::__construct(): Argument #4 ($file_system) must be of type Drupal\Core\File\FileSystem, Drupal\s3fs\S3fsFileService given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259
🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I moved this issue to version 4.x because 3.x is no more supported.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I moved this issue to version 4.x because 3.x is no more supported.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I moved this issue to version 4.x because 3.x is no more supported.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I did another patch to use input type="datetime-local", if could be useful for someone.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/datetime...

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

@tongadall you are right!

Here is the fixing patch.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Patch #4 works in my Drupal 9.5.7 new installation.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

Thank you Rob-PS for your request. I will fix it in the next few days accordingly to my availability.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

I've changed the status to "Needs work" because this must be in the core. There is this contrib module https://www.drupal.org/project/date_popup that could help.

I tested the patch #270 [PP-2] Use form element of type date instead textfield when selecting a date in an exposed filter Needs work and I get that in my view (it has two date fields in exposed filters)

So it works, but I don't need the time field in my case. So probably some other work on it is needed.

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

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

Production build 0.71.5 2024