Merged, thx : ))
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?
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.
I see, thx : ) It's merged
Hi @aman_lnwebworks,
Thx by the patch.
What PHP version are you using?
Is this issue about Drupal core? I don't see relation between system.date/country.default and currency module.
Hi, I want to note that the workaround does not work with custom entities that have field groups in them.
Great solution in #8. Maybe it should be added to the documentation?
psf_ → created an issue.
Hi, I will anote some related information. :)
Workaround: https://drupal.stackexchange.com/questions/253978/how-do-i-allow-full-ht...
+1 here :) . I'm using Drupal 10.2.5
alvar0hurtad0 → credited psf_ → .
+1
Thx : )
Thx :)
If we have more that one importer for a entity type, the "Select importer" input don't filter by permissions.
After select entity type the module display a select with all plugins of selected entity type.
Sorry :_ D
Work for me, but it need a bit of debug.
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.
I'm working on this. : )
psf_ → created an issue. See original summary → .
Here are a guide that could be useful: https://befused.com/drupal/ultimate-cron/
All code is committed in dev branch.
Fixes code style in dev branch: https://git.drupalcode.org/project/openai_client/-/commit/f7d7f08fea1f7c...
Please, if anyone can review it...
Ignore my last comment : )) I will commit it.
Thx : )
Nice see this issue patch : ))
Could you commit the to the issue folk?
Thx
#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();
+1
I added this issue to the module description.
Thx
New updated patch in https://git.drupalcode.org/project/phone_international/-/merge_requests/... , MR 12 in this issue.
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.
penyaskito → credited psf_ → .
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
Require fix tests.
Same path to Drupal 11.x
New patch to Drupal 10.1.x.
I used the same approach that in Cron::invokeCronHandlers().
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.
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.
#10 don't work for me, the page enter in infinite loop.
Any Drupal module need to be enabled to use it.
Thx by the note :_ D
Please, could you extend this module with the new command and document it in the readme?
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)
Patch in #4 works for me.
Drupal: 9.5.8
Elasticsearch: 7.17.6
New release version published. Thx all : ))
Hi, thx. I merged the fix, please, mark it how fixed if is ok : )
Please, if someone can try the dev branch I can add a new version.
Thx for the patch,
Please, could you use the Merge Request instead of the patch file?
I added the composer.json to a new branch, and now I can install it.
To try we need two steps:
-
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": { ...
-
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.
Nice :_ D
Yes, tomorrow I find time to do it : )
+1, patch works.
Today Mime Mail have ten times more installations that Symfony Mailer, I think that have more sense work in Mime mail.
+1
We can't apply the patch before install it, and we can't install because don't have a composer.json file.
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.
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...
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.
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.