🇬🇧United Kingdom @therobyouknow

Account created on 23 October 2007, over 16 years ago
#

Recent comments

🇬🇧United Kingdom therobyouknow

plus ability to search for author and literature

broaden search

🇬🇧United Kingdom therobyouknow

so that the ordering reflects more about the species itself rather than alphabetical

🇬🇧United Kingdom therobyouknow

being able to trace

RIS file import
Zotero.org export/import

🇬🇧United Kingdom therobyouknow

make use of revision

perhaps a timeline to show before and after

🇬🇧United Kingdom therobyouknow

Re: Comment #19: https://www.drupal.org/project/forum_access/issues/3333087#comment-15540181 🐛 Forum access table template breaks on Drupal 10 Closed: duplicate

Thank you for providing a solution in https://www.drupal.org/project/forum_access/issues/3410468 💬 Drupal 10 compatibility fixes Needs review

With regards marking this issue here, 3333087, as duplicate, this issue was created at the beginning of 2023, January 2023. Whereas #3410468: Drupal 10 compatibility fixes - https://www.drupal.org/project/forum_access/issues/3410468 💬 Drupal 10 compatibility fixes Needs review was created nearly 12 months later, at the end of 2023. Therefore one way to look at it is that an issue is a duplicate if it is for a problem covered by a previously created issue. So one could say that this issue 3333087 is not the duplicate as it was created first.

Moreover, this issue 3333087 is also very specific about the problem - the site breaks with forum access enabled when creating/editing a forum with forum access enabled and this issue provides specific solutions to fix it. Whereas the other issue says "Encounter issues related to compatibility" - but doesn't state what they actually are - what is seen? error? unexpected behaviour? So those who encounter the problem may not find issue 3410468, because they may not use "compatibility" in their search for a solution, but rather "fatal error" with the error details and so land here on 3333087.

However, issue 3410468 would appear to explain @salvis's comment "It was a mistake to mark Forum Access as ready for D10." From the solving patch in comment #24 cited from comment #29 https://www.drupal.org/files/issues/2024-04-06/forum_access-3410468-24.p... I can see that there apart from the forum access fatal error issue solution to change the twig, there are other changes e.g. as to how files are included, presumably for Drupal 10 which explains "It was a mistake to mark Forum Access as ready for D10."

Thanks again.

🇬🇧United Kingdom therobyouknow

This is perhaps a great example for using import maps.

What exactly is an import map?

Answer:

This can be used to allow JS imports without having to specify the full path to the JS file.

- From: https://www.drupal.org/project/importmap

Import maps are available in Javascript and aren't a Drupal-specific concept; Javascript projects in general can use them.

Modules:

https://www.drupal.org/project/importmap (aforementioned)
https://www.drupal.org/project/importmaps

https://www.drupal.org/project/dropzonejs/issues/3295283#comment-15492496 📌 Installation not working with Dropzone 6 Needs review

🇬🇧United Kingdom therobyouknow

This is perhaps a great example for using import maps.

What exactly is an import map?

Answer:

This can be used to allow JS imports without having to specify the full path to the JS file.

- From: https://www.drupal.org/project/importmap

Import maps are available in Javascript and aren't a Drupal-specific concept; Javascript projects in general can use them.

Modules:

https://www.drupal.org/project/importmap (aforementioned)
https://www.drupal.org/project/importmaps

🇬🇧United Kingdom therobyouknow

@salvis

Well, with my patch, it works just fine: i can now administer https://taxanotes.org/forum
(This has several members forums not publicly visible)

The bug was simply a twig syntax error as I had explained. The solution also explained was to simplify that syntax. That's quite a world away from not being ready for D10, to my mind it looks fine!

Though I haven't yet tested it on 10.1.

Thank you very much for all your work on this module.

🇬🇧United Kingdom therobyouknow

Thanks @salvis for your follow up in #11.

In #6 I have explained why I got this fatal error and what I did to fix it, providing before and after code. Therefore please can you comment on that comment #6 because I would be surprised that your applying my patch did not fix the issue as I have explained what they change needed to be.

@chike thank you for your contribution also. However, to say "failed to apply on Drupal 10" is not correct because I have explained a solution in #6 and then in #7 , #8 and #9 explained how I produced my patches and documented my testing of them. You haven't provided similiar detail to explain your finding nor similar detail for your own solution. Also 2 further things: 1) You would want to detail your particular version of Drupal 10, it would appear to be 10.0.7. Myself, with my comment coming before yours, I was using 10.0.9 - a later version. 2) This issue is about a Drupal 10 module - and so were my patches for the module running on Drupal 10, therefore the patch is not for Drupal 10 itself.

The solution I have created works for my setup and I have provided everything to help someone else use it. My next step will be to look out for a new release or patch from @salvis. For the time being, I'll leave it there and that would be all I would need to comment about my solution to this issue.

🇬🇧United Kingdom therobyouknow

Agree with https://www.drupal.org/project/geolocation/issues/3328967#comment-14924312 🐛 New dependency jquery_ui_autocomplete is not automatically enabled Fixed

In turn, I had to composer install a later version of jquery_ui

I got it working. Here are my failures, then my successes and my composer.json file:

my failures:

$ ./composer require 'drupal/geolocation:^3.12'
./composer.json has been updated
Running composer update drupal/geolocation
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/jquery_ui_autocomplete 2.0.0 requires drupal/jquery_ui ^1.6 -> found drupal/jquery_ui[1.6.0] but the package is fixed to 1.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - drupal/geolocation 3.12.0 requires drupal/jquery_ui_autocomplete ^2.0 -> satisfiable by drupal/jquery_ui_autocomplete[2.0.0].
    - Root composer.json requires drupal/geolocation ^3.12 -> satisfiable by drupal/geolocation[3.12.0].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
$ ./composer require 'drupal/geolocation:^3.12'
./composer.json has been updated
Running composer update drupal/geolocation
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/geolocation[dev-3.x, 3.12.0] require drupal/jquery_ui_autocomplete ^2.0 -> satisfiable by drupal/jquery_ui_autocomplete[2.0.0, 2.x-dev (alias of dev-2.x)].
    - drupal/jquery_ui_autocomplete 2.x-dev is an alias of drupal/jquery_ui_autocomplete dev-2.x and thus requires it to be installed too.
    - drupal/jquery_ui_autocomplete[dev-2.x, 2.0.0] require drupal/jquery_ui ^1.6 -> found drupal/jquery_ui[dev-1.x, 1.6.0, 1.x-dev (alias of dev-1.x)] but the package is fixed to 1.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - drupal/geolocation 3.x-dev is an alias of drupal/geolocation dev-3.x and thus requires it to be installed too.
    - Root composer.json requires drupal/geolocation ^3.12 -> satisfiable by drupal/geolocation[3.12.0, 3.x-dev (alias of dev-3.x)].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
l$ ./composer require 'drupal/jquery_ui_autocomplete:^2.0'
./composer.json has been updated
Running composer update drupal/jquery_ui_autocomplete
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/jquery_ui_autocomplete ^2.0 -> satisfiable by drupal/jquery_ui_autocomplete[2.0.0].
    - drupal/jquery_ui_autocomplete 2.0.0 requires drupal/jquery_ui ^1.6 -> found drupal/jquery_ui[1.6.0] but the package is fixed to 1.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
$ ./composer require 'drupal/jquery_ui_autocomplete:^
2.0'
./composer.json has been updated
Running composer update drupal/jquery_ui_autocomplete
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires drupal/jquery_ui_autocomplete ^2.0 -> satisfiable by drupal/jquery_ui_autocomplete[2.0.0].
    - drupal/jquery_ui_autocomplete 2.0.0 requires drupal/jquery_ui ^1.6 -> found drupal/jquery_ui[1.6.0] but the package is fixed to 1.4.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
$

now, my successes:

essentially these worked:

./composer require 'drupal/jquery_ui:^1.6.0'
./composer require 'drupal/jquery_ui_autocomplete:^2.0'
./composer require 'drupal/geolocation:^3.12'

full command output of above:

$ ./composer require 'drupal/jquery_ui_autocomplete:^2.0'
./composer.json has been updated
Running composer update drupal/jquery_ui_autocomplete
Loading composer repositories with package information
Updating dependencies
Lock file operations: 2 installs, 0 updates, 0 removals
  - Locking drupal/jquery_ui_autocomplete (2.0.0)
  - Locking drupal/jquery_ui_menu (2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Downloading drupal/jquery_ui_menu (2.0.0)
  - Downloading drupal/jquery_ui_autocomplete (2.0.0)
  - Installing drupal/jquery_ui_menu (2.0.0): Extracting archive
  - Installing drupal/jquery_ui_autocomplete (2.0.0): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
$ ./composer require 'drupal/geolocation:^3.12'
./composer.json has been updated
Running composer update drupal/geolocation
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/geolocation (3.12.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Downloading drupal/geolocation (3.12.0)
  - Installing drupal/geolocation (3.12.0): Extracting archive
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package symfony/debug is abandoned, you should avoid using it. Use symfony/error-handler instead.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.
Generating autoload files
49 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
$
🇬🇧United Kingdom therobyouknow

Tested my own patch successfully.

Ensured I had the patch facility added to my composer.json file:

./composer require cweagans/composer-patches

and I added the following lines, referencing my patch to my composer.json file:

        "enable-patching": true,
        "patches": {
            "drupal/forum_access":
               {
                  "Forum access table template breaks on Drupal 10. Fix for 8.x-1.0-beta1":
                  "web/modules/patches/forum_access-issue-3333087-comment-6-15043297-template-breaks-on-drupal-10.patch"
               }
        }

I'm using the patch I made against 8.x-1.0-beta1

So my whole composer.json file, where I have tested the patch successfully looks like:

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^2.0",
        "cweagans/composer-patches": "^1.7",
        "drupal/core-composer-scaffold": "^10.0",
        "drupal/core-project-message": "^10.0",
        "drupal/core-recommended": "^10.0",
        "drupal/forum": "^1.0",
        "drupal/forum_access": "^1.0@beta",
        "drupal/mailsystem": "^4.4",
        "drupal/seven": "^1.0",
        "drupal/smtp": "^1.2",
        "drupal/social_auth_facebook": "^4.0",
        "drupal/social_auth_google": "^4.0",
        "drush/drush": "^11.5"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "phpstan/extension-installer": true,
            "dealerdirect/phpcodesniffer-composer-installer": true,
            "cweagans/composer-patches": true
        },
        "sort-packages": true
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        },
        "enable-patching": true,
        "patches": {
            "drupal/forum_access":
               {
                  "Forum access table template breaks on Drupal 10. Fix for 8.x-1.0-beta1":
                  "web/modules/patches/forum_access-issue-3333087-comment-6-15043297-template-breaks-on-drupal-10.patch"
               }
        }
    }
}
🇬🇧United Kingdom therobyouknow

And here is a patch for the dev release, 8.x-1.x-dev updated 10 Oct 2022 at 11:07 UTC

The git branch for the dev release, 8.x-1.x-dev is called 8.x-1.x as shown to the right on https://www.drupal.org/project/forum_access/releases/8.x-1.x-dev

Following easy steps to create a patch: https://drupal.stackexchange.com/a/287849/1082

git clone --branch 8.x-1.x http://git.drupal.org/project/forum_access.git
cd forum_access
# edit template file (as per change in https://www.drupal.org/project/forum_access/issues/3333087#comment-15043297 🐛 Forum access table template breaks on Drupal 10 Closed: duplicate )
vi templates/forum-access-table.html.twig
# create patch
git diff 8.x-1.x > ../forum_access-issue-3333087-comment-6-15043297-for-8.x-1.x-template-breaks-on-drupal-10.patch

🇬🇧United Kingdom therobyouknow

As request by @salvis

Please post a patch.

Attached is a patch for the fix described in my comment #6: https://www.drupal.org/project/forum_access/issues/3333087#comment-15043297 🐛 Forum access table template breaks on Drupal 10 Closed: duplicate

I will test this in my composer.json and add the composer.json here once successful, also my steps for creating the patch.

🇬🇧United Kingdom therobyouknow

Thank you for raising this issue. Here is a hot fix (I will try to remember the various steps to make a patch)

To add further info to the issue description, the location of the fatal error file is:

web/modules/contrib/forum_access/templates/forum-access-table.html.twig

The original code contents of this file, with fatal error, is below:

<table{{ attributes.addClass(classes) }}>
    {% if form.header %}
        <thead>
        <tr>
            {% for key, column in form.header if key|first != '#' %}
                <th>
                    {{- column }}
                </th>
            {% endfor %}
        </tr>
        </thead>
    {% endif %}
    {% for key, column in form.rows if key|first != '#' %}
        <tr>
            {% for key2, column2 in column if key2|first != '#' %}
                <td>
                    {{- column2 }}
                </td>
            {% endfor %}
        </tr>
    {% endfor %}
</table>

My hot fix is to amend the code as follows:

<table{{ attributes.addClass(classes) }}>
    {% if form.header %}
        <thead>
        <tr>
            {% for key, column in form.header %}
              {% if key|first != '#' %}
                <th>
                    {{- column }}
                </th>
              {% endif %}
            {% endfor %}
        </tr>
        </thead>
    {% endif %}
    {% for key, column in form.rows %}
       {% if key|first != '#' %}
        <tr>
            {% for key2, column2 in column %}
              {% if key2|first != '#' %}
                <td>
                    {{- column2 }}
                </td>
              {% endif %}
            {% endfor %}
        </tr>
       {% endif %}
    {% endfor %}
</table>

So that the ifs have their own structure nested in the for loop structure, rather than the apparently problematic in-line version that seemed to cause the fatal error.

With this adjustment, my site on that page now worked, without the error.

I will try to make a patch too.

my setup where I saw this error:

Drupal 10.0.9
php 8.1.18
Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1

theme: Olivero 10.0.9 (default theme)

🇬🇧United Kingdom therobyouknow

answer: yes.

I had an error in my settings:

$config['smtp.settings']['smtp_fromname'] = '@gmail.org';

i.e. gmail.org - incorrect

should be:

$config['smtp.settings']['smtp_fromname'] = '@gmail.com';

gmail.com

closing issue.

🇬🇧United Kingdom therobyouknow

my setup:

Drupal 10.0.9
php 8.1.18
Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1

in settings.php added:

$config['smtp.settings']['smtp_server'] = 'smtp.gmail.com';
$config['smtp.settings']['smtp_port'] = '587';
$config['smtp.settings']['smtp_protocol'] = 'tls';
$config['smtp.settings']['smtp_username'] = '<my-email-address-here>@gmail.org';
$config['smtp.settings']['smtp_password'] = '<Google App Password here>';
$config['smtp.settings']['smtp_from'] = $config['smtp.settings']['smtp_username'];
$config['smtp.settings']['smtp_fromname'] = '<my-email-address-here>@gmail.org';

The above approach as worked for Zoho mail, with Zoho app password.

🇬🇧United Kingdom therobyouknow

my setup:

Drupal 10.0.9
php 8.1.18
Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1

theme: Olivero 10.0.9 (default theme)

🇬🇧United Kingdom therobyouknow

thanks @arisen - closed as worked as designed.

🇬🇧United Kingdom therobyouknow

Not sure why it needs to be "dev" though, given that the release doesn't have that mentioned in the name, nor alpha, nor beta, it's just: "1.0.0", so I'd say stable ought to work.

🇬🇧United Kingdom therobyouknow

If I relax the stability to "minimum-stability": "dev", I can install it.

Champion @ressa - yes that worked, thankyou:

$ ./composer require 'drupal/forum:^1.0'
Info from https://repo.packagist.org: #StandWithUkraine
./composer.json has been updated
Running composer update drupal/forum
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking drupal/forum (dev-1.x 4978fff)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Syncing drupal/forum (dev-1.x 4978fff) into cache
  - Installing drupal/forum (dev-1.x 4978fff): Cloning 4978fff629 from cache
Generating autoload files
42 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
$
🇬🇧United Kingdom therobyouknow

Here are my setup details to help troubleshoot the issue:

I'm running

Drupal 10.0.9
php 8.1.18
Database Version 10.6.12-MariaDB-0ubuntu0.22.04.1

My composer.json file is as follows:

{
    "name": "drupal/recommended-project",
    "description": "Project template for Drupal projects with a relocated document root",
    "type": "project",
    "license": "GPL-2.0-or-later",
    "homepage": "https://www.drupal.org/project/drupal",
    "support": {
        "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
        "chat": "https://www.drupal.org/node/314178"
    },
    "repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        }
    ],
    "require": {
        "composer/installers": "^2.0",
        "drupal/core-composer-scaffold": "^10.0",
        "drupal/core-project-message": "^10.0",
        "drupal/core-recommended": "^10.0",
        "drupal/social_auth_facebook": "^4.0",
        "drush/drush": "^11.5"
    },
    "conflict": {
        "drupal/drupal": "*"
    },
    "minimum-stability": "stable",
    "prefer-stable": true,
    "config": {
        "allow-plugins": {
            "composer/installers": true,
            "drupal/core-composer-scaffold": true,
            "drupal/core-project-message": true,
            "phpstan/extension-installer": true,
            "dealerdirect/phpcodesniffer-composer-installer": true
        },
        "sort-packages": true
    },
    "extra": {
        "drupal-scaffold": {
            "locations": {
                "web-root": "web/"
            }
        },
        "installer-paths": {
            "web/core": [
                "type:drupal-core"
            ],
            "web/libraries/{$name}": [
                "type:drupal-library"
            ],
            "web/modules/contrib/{$name}": [
                "type:drupal-module"
            ],
            "web/profiles/contrib/{$name}": [
                "type:drupal-profile"
            ],
            "web/themes/contrib/{$name}": [
                "type:drupal-theme"
            ],
            "drush/Commands/contrib/{$name}": [
                "type:drupal-drush"
            ],
            "web/modules/custom/{$name}": [
                "type:drupal-custom-module"
            ],
            "web/profiles/custom/{$name}": [
                "type:drupal-custom-profile"
            ],
            "web/themes/custom/{$name}": [
                "type:drupal-custom-theme"
            ]
        },
        "drupal-core-project-message": {
            "include-keys": [
                "homepage",
                "support"
            ],
            "post-create-project-cmd-message": [
                "<bg=blue;fg=white>                                                         </>",
                "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                "<bg=blue;fg=white>                                                         </>",
                "",
                "<bg=yellow;fg=black>Next steps</>:",
                "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                "  * Get support: https://www.drupal.org/support",
                "  * Get involved with the Drupal community:",
                "      https://www.drupal.org/getting-involved",
                "  * Remove the plugin that prints this message:",
                "      composer remove drupal/core-project-message"
            ]
        }
    }
}
Production build 0.69.0 2024