- Issue created by @johnwt
Module is still not upgradable from 3.2.2 to 3.3. due to requiring flexible permissions 2.0.1 which is replace by a core API.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
Remove dependency on flexible_permissions 2.0.1 and use the core Acess Policy API.
That would require a new major version, which is exactly why I'll only be able to do this in Group v4, which will start development soon.
Result is a an error message relating to flexible_permissions
Which error?
However the site becomes inaccessible with the message 'The website encountered an unexpected error. Try again later.'
What does the dblog show?
This is how I attempted the upgrade:
**:~/drupal$ composer require 'drupal/group:^3.3' ./composer.json has been updated Running composer update drupal/group 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/group ^3.3 -> satisfiable by drupal/group[3.3.0, ..., 3.3.x-dev]. - drupal/group[3.3.0, ..., 3.3.x-dev] require drupal/flexible_permissions ^2.0 -> found drupal/flexible_permissions[dev-2.0.x, 2.0.0, 2.0.1, 2.0.x-dev (alias of dev-2.0.x)] but the package is fixed to 1.1.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. **:~/drupal$ composer require 'drupal/group:^3.3' -W ./composer.json has been updated Running composer update drupal/group --with-all-dependencies Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 2 updates, 0 removals - Upgrading drupal/flexible_permissions (1.1.0 => 2.0.1) - Upgrading drupal/group (3.2.2 => 3.3.3) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 2 updates, 0 removals - Upgrading drupal/flexible_permissions (1.1.0 => 2.0.1): Extracting archive - Upgrading drupal/group (3.2.2 => 3.3.3): Extracting archive
The entire site then became inaccessible with the message:
"The website encountered an unexpected error. Try again later."I reverted to group 3.2.2 in order to be able to access the site. dblog had the errors:
Error: Class "Drupal\flexible_permissions\Cache\MemoryCacheFactory" not found in Drupal\Component\DependencyInjection\Container->createService() (line 261 of /var/www/web132/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php).
and
Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException: Circular reference detected for service "router.route_provider", path: "options_request_listener -> router.route_provider -> cache_tags.invalidator -> cache.flexible_permissions_memory -> cache.backend.corefix_memory_no_serialize -> maintenance_mode_subscriber -> url_generator". in Drupal\Component\DependencyInjection\Container->get() (line 149 of /var/www/web132/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php)
and two more error messages referring to flexible_permissions.
- π§πͺBelgium kristiaanvandeneynde Antwerp, Belgium
May sound like a dumb question, but did you drush cr after upgrading your files with composer?
I have now, I get:
Error: Class "Drupal\flexible_permissions\Cache\MemoryCacheFactory" not found in Drupal\Component\DependencyInjection\Container->createService() (line 261 of /var/www/web132/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php) #0 /var/www/web132/drupal/web/core/lib/Drupal/Component/DependencyInjection/Container.php(179): Drupal\Component\DependencyInjection\Container->createService()- Status changed to Postponed: needs info
about 1 month ago 5:53pm 21 January 2025 - πΊπΈUnited States jonathanlgrrl
I recently was able to upgrade from groups 3.2.2 to 3.3.3.
These are the steps I took:- First, I made sure I was on the latest version of Drupal Core. This can be done in composer with composer update.
- Once this is done, groups should not have updated if it is on the latest unsupported version (at least, mine did not).
- Then, run the update the composer.json file to have the correct flexible_permissions and groups versions.
- Finally, you can run the code and clear the cache.
composer require 'drupal/group:^3.3' -W
It should work on 3.3.3 since 3.3.0 had some weird bugs.
- πΊπΈUnited States calmforce
I hit the same issue when trying to upgrade from 3.2 to 3.3 - the site is not accessible, generating fatal errors. I had 3.2 for many months and it was working well for me . However, 3.2 fell into the "unsupported" territory and I decided to upgrade to 3.3. Since it is a minor version upgrade, I did not think it may screw me up so badly. After upgrade via composer of the group module and all the related modules (I have also in use group_content_menu, group_term, groupblock, groupmedia and subgroup, all tied up to the group version) I ran "drush updb" and got these messages:
-------- ----------- --------------- -----------------------------------------
gnode 8007 hook_update_n 8007 - Updates views to drop obsolete
key.
group 10300 hook_update_n 10300 - Updates database and fields
from Group 2 to Group 3.
group 10301 hook_update_n 10301 - Updates indexes from Group 2 to
Group 3.
group 10302 hook_update_n 10302 - Updates views from Group 2 to
Group 3.
group 10303 hook_update_n 10303 - Updates views to drop obsolete
key.
group 10304 hook_update_n 10304 - Make state key for tracking if
we came from version 2 clearly defined.
---------------------------------------------------------------------------------------------------------------------So here is the first question: why is it saying "Updates .... from Group 2 to Group 3"? I had Group 3.2 before the upgrade. After these updates the site is dead, I am getting this fatal error message "php Error InvalidArgumentException: Field group_roles is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 616 of..."
Since I did not know how to fix the error, I decided to reload the DB backup (so back to group ver. 3.2) and downgrade to group ver 2, since it will be supported until 2028. That did not work either, after downgrading all related modules to ver 2 I am getting this fatal error: "php Error Drupal\Component\Plugin\Exception\PluginNotFoundException: The "group_relationship" entity type does not exist."
So now I am stuck with unsupported group ver. 3.2: I cannot upgrade to 3.3 (error "Field group_roles is unknown") and cannot downgrade to ver. 2 ("group_relationship" entity type does not exist)
To the module maintainers: please help me to get out of this situation. The minor version upgrade should not be such a hassle! I want to go to ver. 3.3 but the group_roles error gets in the way.
- πΊπΈUnited States jeffreysmattson
I installed version 3.3.3 never having used it before and I get the "Field group_roles is unknown" error.