- 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
3 days 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.