Instead of increasing the maxlength for the API key field, I recommend using the Key module for securely storing API keys. This allows flexibility and better security without worrying about arbitrary field length limits.
if (\Drupal::moduleHandler()->moduleExists('key')) {
$key = \Drupal\key\Entity\Key::load('openai_api_key');
$api_key = $key ? $key->getKeyValue() : '';
} else {
$api_key = $this->config('openai.settings')->get('api_key');
}
// Set default if $is_daylight_saving_time is NULL.
$is_daylight_saving_time = isset($is_daylight_saving_time) ? min(1, max(-1, intval($is_daylight_saving_time))) : -1;
Thank you all for your valuable contribution.
Thank you for your contribution. Please add changes on https://www.drupal.org/project/bundle_reference/issues/3342297 ๐ Implement hook_help() RTBC
Pinesh โ made their first commit to this issueโs fork.
Pinesh โ made their first commit to this issueโs fork.
Pinesh Kumar โ made their first commit to this issueโs fork.
Review is done and tested.
Moved to RTBC
Pinesh Kumar โ made their first commit to this issueโs fork.
The changes from the patch are already available in the latest 3.x version. You can find them in the 3.0.0-rc3 release:
https://www.drupal.org/project/social_auth_facebook_api/releases/3.0.0-rc3 โ
Pinesh Kumar โ made their first commit to this issueโs fork.
Pinesh Kumar โ made their first commit to this issueโs fork.
Pinesh Kumar โ created an issue.
Thank you for your valuable contribution, abdhomsi.
I have incorporated all the changes related to the following issues:
#3003667
#3140145
#3395214
Pinesh Kumar โ made their first commit to this issueโs fork.
Pinesh Kumar โ made their first commit to this issueโs fork.
Pinesh Kumar โ made their first commit to this issueโs fork.
To improve the performance of the /webform_rest/{webform_id}/fields
endpoint by enabling caching, ModifiedResourceResponse
to ResourceResponse
. The ModifiedResourceResponse
does not support caching, which results in a no-cache directive being set on the HTTP headers, leading to poor performance. The patch below modifies the response to use ResourceResponse
, which supports caching and should significantly improve response times.
Pinesh Kumar โ made their first commit to this issueโs fork.
Re-roll patch #3 for 2.x-dev
hey mihailnovak,
The {sid} in your path refers to the Submission ID. To retrieve the submissions, you need the specific ID for each submission.
To get a list of all submissions for a webform, please refer to the following issue which provides detailed information:
(How to retrieve all submissions for a form?.)
โจ
How to retrieve all submissions for a form?
Needs review
This should help you access and manage your webform submissions effectively.
Pinesh Kumar โ made their first commit to this issueโs fork.
Duplicate of #3171835: https://www.drupal.org/project/drupal/issues/3171835 ๐ Field Groups marked as required are missing red asterisk Needs work
Pinesh Kumar โ created an issue.
In Drupal 8 and later, you can use an event subscriber to achieve similar functionality. Here's an example of how you can convert your code to work in Drupal 8/9/10:
1. Create a file for your custom module:
Create a file named MYMODULE.services.yml in your module's src directory (create the src directory if it doesn't exist yet).
2. Define the service:
Add the following code to MYMODULE.services.yml to define the service and the class that will handle the event:
services:
MYMODULE.event_subscriber:
class: '\Drupal\MYMODULE\EventSubscriber\RedirectEventSubscriber'
tags:
- { name: 'event_subscriber' }
3. Create the event subscriber class:
Create a file named RedirectEventSubscriber.php in your module's src/EventSubscriber directory (create the EventSubscriber directory if it doesn't exist yet). Add the following code to the file:
<?php
namespace Drupal\MYMODULE\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
class RedirectEventSubscriber implements EventSubscriberInterface {
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
$events[KernelEvents::REQUEST][] = ['onRequest'];
return $events;
}
/**
* Redirect logic.
*/
public function onRequest(GetResponseEvent $event) {
$request = $event->getRequest();
$path = \Drupal::service('path.current')->getPath();
$arg = explode('/', trim($path, '/'));
$last_key = key(array_slice($arg, -1, 1, TRUE));
if ($arg[$last_key] == 'all') {
unset($arg[$last_key]);
$redirect_path = implode('/', $arg);
$response = new \Symfony\Component\HttpFoundation\RedirectResponse($redirect_path, 301);
$event->setResponse($response);
}
}
}
Now, the logic from your MYMODULE_init() function has been moved to the RedirectEventSubscriber class. This class listens for the KernelEvents::REQUEST event and checks for the 'all' path component, redirecting as needed.
Issue #123456: Updated DashboardForm to be compatible with Drupal 9/10 coding standards
This patch updates the DashboardForm class in the Mail Safety module to adhere to the coding standards of Drupal 9/10. The changes include:
- Updated reset btn id(#edit-keyword-search) for keyword search.
- Updated class dependencies to use the correct type-hinted interfaces.
- Updated translation function calls to use $this->t() for proper translation handling.
- Updated class and method comments to provide more meaningful descriptions.
Drupal Upgrade Status and coding standards.
Automated Drupal 10 compatibility fixes
vuil
I have updated the permission. Please check.
thank you!!