🇬🇧United Kingdom @somersoft

Account created on 19 July 2011, almost 14 years ago
#

Merge Requests

More

Recent comments

🇬🇧United Kingdom somersoft

@berdir I have merged the 8.x-1.9 tag which is at 8.x-1.v HEAD into the 3004561-support-tls-for branch.

🇬🇧United Kingdom somersoft

The changes since #6

  • I have taken onboard the comment about one client per cache bin and now it is one client per service endpoint.
  • Some of the calls to getClient() did not pass a parameter where the context provide one.
  • The _container_ cache was added to the report
  • The report was tweaked for reporting locks, flood, queue etc entries.
  • The name of the settings key is now a class constant so that if it needs to change, it is only changed in one place.

Notes

  • The patch is applied against the 1.9.0 tag.
  • The list of other patches applied before this remains the same.
🇬🇧United Kingdom somersoft

@pbouchereau Good call. I have update the branch.

🇬🇧United Kingdom somersoft

Patch file from the merge request is at https://git.drupalcode.org/project/seckit/-/merge_requests/11.diff and it patches seckit 2.0.3 too.

    "drupal/seckit": {
      "CSP: Directive script-src-elem violated with googletagmanager - https://www.drupal.org/project/seckit/issues/3208781": "https://git.drupalcode.org/project/seckit/-/merge_requests/11.diff"
    },
🇬🇧United Kingdom somersoft

As mentioned in the description. compatibilty with <10.3 is broken by using PHP Attributes in 3.0.5.

The last release to work <10.3 is 3.0.4.

The comment is here to help others.

{
  "require": {
      "drupal/private_message": "3.0.4",
   }
}
🇬🇧United Kingdom somersoft

somersoft changed the visibility of the branch 4.x to hidden.

🇬🇧United Kingdom somersoft

It seems that the 4.x branch has been updated.
This updates the 3.0.x branch.

🇬🇧United Kingdom somersoft

Rerolled the patch #20 so that if there is a database prefix configured then it is used.

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Here is the patch for 3.2.7.

The other one is for 8.x-1.x branch

🇬🇧United Kingdom somersoft

Patch rerolled for 1.0.0-beta3
Suggested updates for composer.json

  "patches": {
    "drupal/calendar": {
      "Calendar module adaptation for Opigno - https://www.drupal.org/project/opigno_calendar/issues/3232403": "https://www.drupal.org/files/issues/2024-12-19/opigno_calendar-Calendar_module_adaption_for_opigno-3232403-3.patch"
    },
}
        "extra": {
            "patches-ignore": {
                "opigno/opigno_lms": {
                    "drupal/calendar": {
                        "Opigno adoptation": "https://www.drupal.org/files/issues/2021-09-10/calendar_opigno_adoptation-3232403-1.patch"
                    }
                }
            }
         }
🇬🇧United Kingdom somersoft

@sgurit and other than use composer, The following can be added to composer.json. The simplest addition is

    repositories: [
        {
            "type": "vcs",
            "url": "https://git.drupalcode.org/issue/seven-3434485.git"
        },
    ]
  require: {
        "drupal/seven": "dev-3434485-d11-compatibility",
  }

If you are using admininal_theme then more information is needed and admininal_theme brings in seven automatically. The fuller version for seven is need as the theme specifies a version number and the version number is added by the Drupal's composer endpoint interface. The Reference value is the full commit hash for the latest commit.

repositories: [
        {
            "type": "package",
            "package": {
                "name": "drupal/seven",
                "version": "1.99",
                "type": "drupal-theme",
                "source": {
                    "url": "https://git.drupalcode.org/issue/seven-3434485.git",
                    "type": "git",
                    "reference": "0c070973e2d97d4a19f04cf99408e22bc9856fef"
                }
            }
        },
        {
            "type": "vcs",
            "url": "https://git.drupalcode.org/issue/adminimal_theme-3460890.git"
        },
    require: {
        "drupal/adminimal_theme": "dev-3460890-drupal-11-compatability",
    }
🇬🇧United Kingdom somersoft

@anaconda777
If you need to migrate more fields in the fieldable content, then copy the migration configuration file, rename the file and id and add the fields. in the process mapping. The source plugin should add the registered fields to the row. For example code see Drupal\node\Plugin\migrate\source\d7\Node.
If not then copy the used source plugin class and extend the SQL query to add the field.
I have a module which has all the custom migration configuration files and plugins so it is a part of that.

🇬🇧United Kingdom somersoft

@casey
The index redis.connection is already used. It is for connection details when there is only one and acts the fallback conection configuration for when no further server is configured for that cache bin. The change does not break any current configurations.
FYI:
cache bin is mentioned here core/lib/Drupal/Core/Cache/CacheFactory.php::24
'bins' and 'servers' are the indexes used in the Memcache configuration. It seems they had the functionality fromearlier on. Wanted the configuration concepts for both to be very similar so moving between using different techonlogies was not difficult for evalution purposes.
Feel free to make updates to the patch file and create one client per server rather than per bin by updating
Drupal\redis\ClientFactory::getClientInterface() and/or ::getClient()

🇬🇧United Kingdom somersoft

@bradallenfisher.
Please can you check how the patch is applied as looking at the issue fork diff the second parameter is changed to have the correct class.

That change is not in the patch uploaded in #2.

Alternative installation of the code if this issue fork repository can be used directly, by adding the following to the project's composer.json

"repositories": [
{
"type": "vcs",
"url": "https://git.drupalcode.org/issue/permissions_by_term-3476575.git"
}
],

and

"require": {
"drupal/permissions_by_term": "dev-3.1.x-dev",
}

then composer can create a compatible set of packages.

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Alternative installation of the code if this repository was used directly, by adding the following to the project's composer.json

    "repositories": [
        {
            "type": "vcs",
            "url": "https://git.drupalcode.org/issue/bootstrap-3428283.git"
        }
    ],

and

    "require": {
        "drupal/bootstrap": "dev-project-update-bot-only",
    }

then composer can create a compatible set of packages.

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Revert which version as 2.x is in another related ticket.

🇬🇧United Kingdom somersoft

Found that some browser will also report for script-src-attr and style-src-attr configuration.

For these changes for the 2.x branch see 💬 CSP: Directive script-src-elem violated with googletagmanager Needs work

🇬🇧United Kingdom somersoft

Extended the merge request to include
script-src-attr
script-src-elem
style-src-attr
style-src-elem

In CSP reports. The D7 version of these changes is in "Directive style-src-elem violated." Active

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Is this a duplicate of Quiz result migration in D8 from D7 Quiz result migration in D8 from D7 Needs work

🇬🇧United Kingdom somersoft

Rerolled the patch for 2.x branch

🇬🇧United Kingdom somersoft

Applied paychin #3 and it worked for me too.

🇬🇧United Kingdom somersoft

Updated the patch for redis 1.8
Here is the list of patches from composer[.patches].json

    "drupal/redis": {
      "Currently Drush Cr or Cache Clear UI does not flush Redis cache - https://www.drupal.org/project/redis/issues/2765895": "https://www.drupal.org/files/issues/redis-n2765895-16.patch",
      "Support TLS for Predis - https://www.drupal.org/project/redis/issues/3004561": "https://www.drupal.org/files/issues/2021-11-19/redis-support_tls_on_predis-3004561-37.patch",
      "Implement initial RedisCluster client integration - https://www.drupal.org/project/redis/issues/2900947": "https://www.drupal.org/files/issues/2024-10-15/2900947-82.patch",
      "Cache bin handling in multiple Redis DBs - https://www.drupal.org/project/redis/issues/2395255": "https://www.drupal.org/files/issues/2024-10-27/redis-Cache_bin_handling_in_multiple_Redis_DBs-2395255-6.patch"
    },
🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Due to changes to code in the source branch, this is one way of using these changes in composer.json

    "repositories": [
        {
            "type": "git",
            "url": "https://git.drupalcode.org/issue/certificate-3286439.git"
        },
    ],
    "require": {
        "drupal/certificate": "dev-3286439-drupal-10",
    }

and no patching configuration.

🇬🇧United Kingdom somersoft

somersoft changed the visibility of the branch 8.x-1.x to hidden.

🇬🇧United Kingdom somersoft

Quick Status Report

Using this baseline.

  • All tests now pass and have no phpcs or phpstan errors.
  • There are no stylelint errors.
  • eslint errors reduced from 125 to 11. Refactoring is now needed to further reduce this number.
  • phpstan errors reduced from 219 to 184. Work is ongoing to reduce this further. There is signs of unfinished work in migrating the code from D7.
  • phpcs errors reduced from 473 to 241. Work is on going to reduce this number further.
🇬🇧United Kingdom somersoft

somersoft created an issue.

🇬🇧United Kingdom somersoft

There are changes to do with solving the issue and also to reduce the number of warnings and errors produced during the running of the Github CI.

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Add the related Course Credit issue to give visibility on the D10 status of that project/package that provides a class for this project/package.

🇬🇧United Kingdom somersoft

There is now a check to see if a certificate is published when generating the list of valid certificates.

The following is from composer.json and shows the commit the patch can be applied to. It is currently the last commit to 4.x branch.

    require: {
        "drupal/certificate": "dev-4.x#<strong>eba7efb019fb9d6bf4566304b1d61043bb491dc3</strong>"
    }

https://git.drupalcode.org/project/certificate/-/commit/eba7efb019fb9d6bf4566304b1d61043bb491dc3
updated at February 2, 2023 at 5:38:41 PM GMT .

All three commits, up to 1ba851f74ca1f541d7bcc6ba2d7b08d96bcd748d, on the 4.0.x branch are also present in this branch.

🇬🇧United Kingdom somersoft

Create a Drupal instance with this module enabled and username validation enable.
Go through the registration process.
Here is where the password validation happens but the passed in account entity has not yet set the username field.
It may be that the enabled Email registration module is having affect.

🇬🇧United Kingdom somersoft

Just PHPCS and PHPSTAN failing on GitLab CI
Example json to add the diff link to composer(.patches).json

"patches": {
    "drupal/certificate": {
        "Automated Drupal 10 compatibility fixes - https://www.drupal.org/project/certificate/issues/3414060": "https://git.drupalcode.org/project/certificate/-/merge_requests/3.diff"
    }
}
🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

Updated the patch for redis 1.7
Here is the list of patches from composer.patches.json

    "drupal/redis": {
      "Currently Drush Cr or Cache Clear UI does not flush Redis cache - https://www.drupal.org/project/redis/issues/2765895": "https://www.drupal.org/files/issues/redis-n2765895-16.patch",
      "Support TLS for Predis - https://www.drupal.org/project/redis/issues/3004561": "https://www.drupal.org/files/issues/2021-11-19/redis-support_tls_on_predis-3004561-37.patch",
      "Implement initial RedisCluster client integration - https://www.drupal.org/project/redis/issues/2900947": "https://www.drupal.org/files/issues/2024-01-15/2900947-60.patch",
      "Cache bin handling in multiple Redis DBs - https://www.drupal.org/project/redis/issues/2395255": "https://www.drupal.org/files/issues/2024-02-01/redis-Cache_bin_handling_in_multiple_Redis_DBs-2395255-5.patch"
    },
🇬🇧United Kingdom somersoft

Updated the patch so that

  1. The controller now uses the 'memcache.settings' service to obtain configuration information.
  2. the class \Drupal\memcache\Driver\DriverBase also uses the 'memcache.settings' service to obtain configuration information after checking the information from the configFactory.
🇬🇧United Kingdom somersoft

From https://git.drupalcode.org/project/ckeditor_selectall/-/blob/8.x-1.x/src... (25th March 2019)

namespace Drupal\ckeditor_selectall\Plugin\CKEditorPlugin;

also from https://git.drupalcode.org/project/ckeditorselectall/-/blob/1.0.x/ckedit... (25th July 2023)

namespace Drupal\ckeditor_selectall\Plugin\CKEditorPlugin;

Perhaps there could be some community monitoring of namespaces.

🇬🇧United Kingdom somersoft

The above Project Update Bot has prompted running rector over the code and it has been updated in the related issue https://git.drupalcode.org/issue/course_relationships-3220941.

This patch was created using these packages:

  1. mglaman/phpstan-drupal: 1.2.6
  2. palantirnet/drupal-rector: 0.19.2
🇬🇧United Kingdom somersoft

@viren18febS
The change only for the specific case mention. I was looking for a more generic solution to cope with all cases.
Thank you for the patch, I will use that until the generic solution is available. and a modified version of it for the other instance.
The another peice of information that could be helpful is that $variables['directory'] is set to the custom theme directory and not the base theme govuk_theme that it extends.

🇬🇧United Kingdom somersoft

somersoft changed the visibility of the branch 2.0.x to hidden.

🇬🇧United Kingdom somersoft

Please review again.

As the oauth2_server.info.yml file needs updating so that it runs with Drupal 10 Framework a fork was made of the code base and updated to be Drupal 10 compatible.
The #26 patch has been added to this code base and also a fix for #28 comment.
The default CI pipeline template has been added and all the tests pass.

Example entry for composer.json

    "repositories": {
        "oauth2_server": {
            "type": "package",
            "package": {
                "name": "drupal/oauth2_server",
                "version": "dev-custom",
                "type": "drupal-module",
                "source": {
                    "url": "https://git.drupalcode.org/issue/oauth2_server-3288840",
                    "type": "git",
                    "reference": "8ed68d27336dcbea0041b0c5e25f92888c6e3ac1"
                }
            }
        }
    }
   "require": {
        "drupal/oauth2_server": "dev-custom"
    }
🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

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

🇬🇧United Kingdom somersoft

somersoft created an issue.

🇬🇧United Kingdom somersoft

Was the email sent as a during the running of the cron functionality?
If so perhaps further investigation is needed there to see if drush cron is being passed the correct parameters. See https://www.drush.org/12.x/commands/core_cron/ for more information on this.

🇬🇧United Kingdom somersoft

Updated to 0.18.1 today and the patch needed to be rerolled.
Ran

vendor/bin/rector --dry-run --config=./tests/rector/rector.php process web/modules/contrib/metatag

and it produced this error

[ERROR] Could not process "/var/www/web/modules/contrib/metatag/tests/fixtures/d8_metatag_v1.php" file, due to:
"System error: "Rector\Core\Rector\AbstractRector::getName(): Argument #1 ($node) must be of type
PhpParser\Node, null given, called in
vendor/palantirnet/drupal-rector/src/Drupal8/Rector/Deprecation/EntityManagerRector.php155"
Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 190

I think this is the line at fault 141

$config['uuid'] = (new Uuid())->generate();

drupal/metatag version: 1.26.0
palantirnet/drupal-rector version: 0.18.1
rector/rector version: 0.18.10

🇬🇧United Kingdom somersoft

Example JSON to use the 'plain diff' link from the issue fork to patch the quiz package in a composer.json file with the "cweagans/composer-patches" package installed.

"patches": {
    "drupal/quiz": {
      "Quiz result migration in D8 from D7 - 3181926": "https://git.drupalcode.org/project/quiz/-/merge_requests/9.diff"
    }
}
🇬🇧United Kingdom somersoft

Merge request created for 2.x branch.

Production build 0.71.5 2024