Huelva
Account created on 13 August 2013, almost 11 years ago
#

Merge Requests

Recent comments

🇪🇸Spain psf_ Huelva

Hi,

The library that we use to connect to OpenAI have compatiblity with tests: https://github.com/openai-php/client?tab=readme-ov-file#testing

But I don't have time to implement it, can anyone create tests?

🇪🇸Spain psf_ Huelva

Hi, thx by the patch.

I have some notes:

- In "src/OpenAIClientWrapper.php" you were erased all comments, it's are required by code styling that we have comments.
- In the protected method getApiToken() we can't send any status message, because that will spawn the user with messages. This method is called so many times.

🇪🇸Spain psf_ Huelva

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

🇪🇸Spain psf_ Huelva

Hi @aman_lnwebworks,

Thx by the patch.

What PHP version are you using?

🇪🇸Spain psf_ Huelva

Is this issue about Drupal core? I don't see relation between system.date/country.default and currency module.

🇪🇸Spain psf_ Huelva

Hi, I want to note that the workaround does not work with custom entities that have field groups in them.

🇪🇸Spain psf_ Huelva

Great solution in #8. Maybe it should be added to the documentation?

🇪🇸Spain psf_ Huelva

If we have more that one importer for a entity type, the "Select importer" input don't filter by permissions.

🇪🇸Spain psf_ Huelva

After select entity type the module display a select with all plugins of selected entity type.

Sorry :_ D

🇪🇸Spain psf_ Huelva

Work for me, but it need a bit of debug.

🇪🇸Spain psf_ Huelva

I'll move the 'CSV Importer' menu link from the 'Configuration > Development' section to the 'Content' section to improve accessibility and relevance. This change aligns the import feature with content-related functionalities, making it more intuitive for content editors and administrators who commonly use this feature as part of their content workflows.

🇪🇸Spain psf_ Huelva

All code is committed in dev branch.

🇪🇸Spain psf_ Huelva

psf_ created an issue.

🇪🇸Spain psf_ Huelva

Nice see this issue patch : ))

Could you commit the to the issue folk?

Thx

🇪🇸Spain psf_ Huelva

#9 tested with version 1.0.0-beta6. Work for me.

In buildForm() I have:

$form['legal_links'] = [
      '#type' => 'multivalue',
      '#title' => $this->t('Legal links'),
      '#description' => $this->t('Links to legal documents in the enrollment form. Leave empty a row to remove it.'),
      '#cardinality' => MultiValue::CARDINALITY_UNLIMITED,
      '#default_value' => $links,
      'link_title' => [
        '#type' => 'textfield',
        '#title' => $this->t('Title'),
        '#description' => $this->t('To include a link, please provide a title as well.'),
      ],
      'link' => [
        '#type' => 'textfield',
        '#title' => $this->t('Link'),
        '#maxlength' => 2048,
        '#element_validate' => [[static::class, 'validateUriElement']],
        '#link_type' => LinkItemInterface::LINK_GENERIC,
        '#description' => $this->t(
          'You can enter an internal path such as %add-node or an external URL such as %url. Enter %front to link to the front page. Enter %nolink to display link text only. Enter %button to display keyboard-accessible link text only.',
          [
            '%front' => '<front>',
            '%add-node' => '/node/add',
            '%url' => 'http://example.com',
            '%nolink' => '<nolink>',
            '%button' => '<button>',
          ]
        ),
      ],
    ];

And to save, in submitForm():

$this->config('mymodule.settings')
      ->set('legal_links', $form_state->getValue('legal_links'))
      ->save();
🇪🇸Spain psf_ Huelva

I added this issue to the module description.

Thx

🇪🇸Spain psf_ Huelva

The patch in #9 don't work for me.

To do the work I need to change

autoPlaceholder: "polite",

to

autoPlaceholder: "off",

in js/phone_international.js

I will try to do a new patch.

🇪🇸Spain psf_ Huelva

Nice, thx for the job.

The next time I will install PHPcs before publish code. I use it daily but when I created the module don't have it installed.

If anyone want integrate PHPcs in DDEV, I writed this commands: https://gist.github.com/PSF1/aedf54d8a62e192e72c9de616ac6e04e

🇪🇸Spain psf_ Huelva

New patch to Drupal 10.1.x.

I used the same approach that in Cron::invokeCronHandlers().

🇪🇸Spain psf_ Huelva

I have the same problems that described in #12 with Drupal 10.1.2, but drush cr don't work anymore.

Installing the composer package symfony/polyfill-uuid and requiring ext-uuid fix my problem for now.

🇪🇸Spain psf_ Huelva

In my case the problem come using configuration split, this module settings was moved from general configuration folder to the a split folder. Importing configuration this module become unconfigured, and lock all the site.

🇪🇸Spain psf_ Huelva

#10 don't work for me, the page enter in infinite loop.

🇪🇸Spain psf_ Huelva

Thx by the note :_ D

Please, could you extend this module with the new command and document it in the readme?

🇪🇸Spain psf_ Huelva

With patch in #46, I use the field in a render array I get error:

Simple form code:

/**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {


    $form['address'] = [
      '#type' => 'address',
      '#title' => $this->t('Address'),
    ];

    $form['actions'] = [
      '#type' => 'actions',
    ];
    $form['actions']['submit'] = [
      '#type' => 'submit',
      '#value' => $this->t('Send'),
    ];

    return $form;
  }

The error:

Warning: Undefined array key "#preferred_countries" in Drupal\address\Element\Address::processAddress() (line 192 of modules/contrib/address/src/Element/Address.php).

Drupal\address\Element\Address::processAddress(Array, Object, Array)
🇪🇸Spain psf_ Huelva

Patch in #4 works for me.

Drupal: 9.5.8
Elasticsearch: 7.17.6

🇪🇸Spain psf_ Huelva

New release version published. Thx all : ))

🇪🇸Spain psf_ Huelva

Hi, thx. I merged the fix, please, mark it how fixed if is ok : )

🇪🇸Spain psf_ Huelva

Please, if someone can try the dev branch I can add a new version.

🇪🇸Spain psf_ Huelva

Thx for the patch,

Please, could you use the Merge Request instead of the patch file?

🇪🇸Spain psf_ Huelva

I added the composer.json to a new branch, and now I can install it.

To try we need two steps:

  1. Add a new repository to a working Drupal installation:

    The order it's important.

    ...
    "support": {
            "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
            "chat": "https://www.drupal.org/node/314178"
        },
        "repositories": [
            {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/bef_select-3356203.git"
            },
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            }
        ],
        "require": {
    ...
    
  2. After that we need require the module: composer require drupal/bef_select:dev-3356203-add-composer-json --prefer-source

    My composer respond with:

    ./composer.json has been updated
    Running composer update drupal/bef_select
    Gathering patches for root package.
    Loading composer repositories with package information
    Updating dependencies                                 
    Lock file operations: 1 install, 0 updates, 0 removals
      - Locking drupal/bef_select (dev-3356203-add-composer-json 18510bd)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 1 install, 0 updates, 0 removals
      - Syncing drupal/bef_select (dev-3356203-add-composer-json 18510bd) into cache
    Gathering patches for root package.
    Gathering patches for dependencies. This might take a minute.
      - Installing drupal/bef_select (dev-3356203-add-composer-json 18510bd): Cloning 18510bd367 from cache
      - Applying patches for drupal/bef_select
        https://git.drupalcode.org/project/bef_select/-/merge_requests/2/diffs.patch (#3356203 - Add Drupal 10 support)
    
    Generating autoload files
    48 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    No security vulnerability advisories found
    

    Please, ignore the patch in the composer response :_ D It's my old project settings.

🇪🇸Spain psf_ Huelva

Yes, tomorrow I find time to do it : )

🇪🇸Spain psf_ Huelva

Today Mime Mail have ten times more installations that Symfony Mailer, I think that have more sense work in Mime mail.

🇪🇸Spain psf_ Huelva

+1
We can't apply the patch before install it, and we can't install because don't have a composer.json file.

🇪🇸Spain psf_ Huelva

I added a new field formatter, but I think that the old one it's compatible too. I copied the old formatter code, change the field_types and cast values in lines 191 and 192.

🇪🇸Spain psf_ Huelva

This module have a mark of minimum-stability of dev:

https://git.drupalcode.org/project/openapi_jsonapi/-/blob/3.x/composer.j...

{
    "name": "drupal/openapi_jsonapi",
    "description": "OpenAPI support for the JSON:API module.",
    "type": "drupal-module",
    "require": {
        "drupal/openapi": "^2",
        "drupal/schemata": "^1"
    },
    "minimum-stability": "dev",
    "license": "GPL-2.0-or-later",
    "authors": [
        {
            "name": "Mateu Aguiló Bosch",
            "email": "mateu.aguilo.bosch@gmail.com"
        }
    ]
}

I don't know why, but this look like a common practice:

https://stackoverflow.com/questions/45019784/but-these-conflict-with-you...

🇪🇸Spain psf_ Huelva

Added core related issue (I think)

In my comment in related core issue I removed the views limitation commented in #4 by @weynhamz, but after saving the site break because views can't work with configuration entities in resultas.

🇪🇸Spain psf_ Huelva

Hi, I don't like add more noise to this issue but I think it's a related use case.

The module https://www.drupal.org/project/config_views allow create views that query configuration entities, and I can create a new view that result all taxonomy vocabularies, for example. If I add a entity reference display to that view I can't select it in a reference field to use the view how list options.

I can't because this:

File: web/core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php line 141 of Drupal 10.0.9.

      if (in_array($view->get('base_table'), [$entity_type->getBaseTable(), $entity_type->getDataTable()])) {
        $display = $view->get('display');
        $options[$view_id . ':' . $display_id] = $view_id . ' - ' . $display[$display_id]['display_title'];
      }

If I replace that code by:

        $display = $view->get('display');
        $options[$view_id . ':' . $display_id] = $view_id . ' - ' . $display[$display_id]['display_title'];

I can select my view, but after saving the site break with this error:

Error: Call to a member function bundle() on null in Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection->stripAdminAndAnchorTagsFromResults() (line 289 of core/modules/views/src/Plugin/EntityReferenceSelection/ViewsSelection.php).

Drupal\views\Plugin\EntityReferenceSelection\ViewsSelection->getReferenceableEntities() (Line: 618)
Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem->getSettableOptions(Object) (Line: 138)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsWidgetBase->getOptions(Object) (Line: 34)
Drupal\Core\Field\Plugin\Field\FieldWidget\OptionsSelectWidget->formElement(Object, 0, Array, Array, Object) (Line: 349)
Drupal\Core\Field\WidgetBase->formSingleElement(Object, 0, Array, Array, Object) (Line: 92)
Drupal\Core\Field\WidgetBase->form(Object, Array, Object) (Line: 287)
Drupal\Core\Field\FieldItemList->defaultValuesForm(Array, Object) (Line: 125)
Drupal\field_ui\Form\FieldConfigEditForm->form(Array, Object) (Line: 106)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('field_config_edit_form', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 580)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 163)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
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: 686)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I think that fail because views only work with content entities, not with configuration entities.

Production build 0.69.0 2024