I think that the issue is more fundamental, since Drupal hasn't yet assigned a uid to the account, so it will be anonymous until the account is saved. We may need to use another method here, like postSave()
to set roles on new account creation.
The ways it's written currently is not working at all in my case, even if I assign a default role in config, the account still retains both the "anonymous" and the "member" roles. I'm going to try to understand better why $account->removeRole('anonymous') doesn't remove that role, there must be another way for that specific case.
I've noticed that $account->removeRole("anonymous") does not remove the role from the account, I'm still seeing both the "anonymous" and "member" roles on the account afterwards, so the issue isn't with the arrays, apparently.
Maybe line 89 could be replaced with
$account_role_ids = $account->getRoles();
$account_role_ids == ["anonymous"] ? $changed_role_ids = [] : $changed_role_ids = $account_role_ids;
On second thought, using array_intersect
there is also not correct, what we want to make sure of is that the "anonymous" role is not added to the $changed_role_ids
array, that way if the current user is anonymous, the role will be removed after using array_diff
on the two arrays.
On line 220 of the UserRolesEventSubscriber
class, the array_diff($account_role_ids, $changed_role_ids)
will return an empty array, if $account_role_ids = [ "anonymous" ]
and $changed_role_ids = [ "anonymous", "member" ]
, because "anonymous" is in both arrays, so not a difference. If we use array_intersect($account_role_ids, $changed_role_ids)
, then we get the desired role(s) that should be removed with $account->removeRole($role_id)
, in this case the "anonymous" role. In fact, maybe there's even a better way to always at least remove the "anonymous" role, since if we're assigning a role to a user, that user is certainly no longer anonymous.
Everything looks OK in the config, and the saml attribute is the same as in the response from the IdP. I'm going to do some debugging in the UserRolesEventSubscriber class like you mentioned, in fact I'm already looking at it.
only_first_login: false
unassign_roles: { }
default_roles: { }
saml_attribute: userrole
saml_attribute_separator: ''
value_map:
-
attribute_value: 'IT Staff'
role_machine_name: member
I have configured the Value conversions this way:
IT Staff|Member
I have double-checked that the SAML attribute is exactly "IT Staff" and that the Drupal role is exactly "Member." Nevertheless, no role is assigned to new users on login.
stephenplatz β created an issue.
I can see that the `menu-item--flyleft` class is added in the responsive-menu-horizontal.html.twig template, for example, after adding that configuration option for the menu item and a `flyleft` attribute added to the child anchor; but that selector is not found anywhere in the css. It appears to be an oversight, unless I'm missing something obvious.
The setting was removed in 498f2f0ad29b3ca8ea649fa088997eae60c50c17 with the commit message that the option wasn't used. However this change breaks our implementation, since we use that configuration key in our authsources.php.
stephenplatz β created an issue.
@mariacha1 I went ahead and created a child issue for this here https://www.drupal.org/project/field_permissions/issues/3443837 π field_permissions_jsonapi_entity_field_filter_access needs to check for instance of \Drupal\field\FieldStorageConfigInterface Active , I thought that may make sense, MR also there.
stephenplatz β created an issue.
I'm seeing something similar in
TypeError: Drupal\field_permissions\FieldPermissionsService::fieldGetPermissionType(): Argument #1 ($field) must be of type Drupal\field\FieldStorageConfigInterface, Drupal\Core\Field\BaseFieldDefinition given, called in /app/web/modules/contrib/field_permissions/src/FieldPermissionsService.php on line 198 in Drupal\field_permissions\FieldPermissionsService->fieldGetPermissionType() (line 138 of /app/web/modules/contrib/field_permissions/src/FieldPermissionsService.php).
using 8.x-1.3 and Drupal 10.2.4.
stephenplatz β created an issue.
I think this issue is fixed, since all of the dependencies for 6.0.3 have D10 releases.
stephenplatz β created an issue.
I'm using php7.4.33, I'm currently on 2.0.1 and neither composer update drupal/recaptcha_v3
nor composer require 'drupal/recaptcha_v3:^2.0'
works to update to 2.0.2, for what it's worth.
In both case just Nothing to install, update or remove
The solution is to restart the server or disable the APC classloader locally.
OK, updated to the most recent versions of each and ran database updates etc. The issue us not resolved for me.
stephenplatz β created an issue. See original summary β .
@gravelpot is completely correct in #10, this issue should not be closed until there is a proper upgrade for the module implementing hook_update().
stephenplatz β created an issue.
stephenplatz β made their first commit to this issueβs fork.
I just noticed the same symptoms and error in the console as @joachim. I was able to get (non-instant) results by editing the URI field in the index to type Lunr: URL.
Adding a Search API JavaScript Back-end server and index and navigating to /js-search/{server}/{index}
is not enough to have a search page with immediate fuzzy results. The keyvaluepairs are indeed indexed in the browser, but the search form is not producing results with this minimal set-up.
Apparently removing the union types makes the module incompatible with HAL 2.x, which is required for Drupal 10. Drupal 9 can use HAL 1.x.
Looks like the change to src/Normalizer/BlockContentNormalizer.php
was just added from the automated patch for Drupal 10 readiness in this commit. Does PHP 8.1 require union types? If not, I think that this part could be left out to support older versions of PHP.
This affects both 8.x-1.x-dev and 8.x-1.2, since union return types were made available in php 8. Would using phpdoc annotations be an alternative?
Rebuilding my app with lando was not a solution for me, composer and drush still failed with the exact error above
PHP Fatal error: Uncaught Error: Failed opening required '/var/www/public_html/vendor/composer/../laminas/laminas-diactoros/src/functions/create_uploaded_file.php' (include_path='/var/www/public_html/vendor/pear/archive_tar:/var/www/public_html/vendor/pear/console_getopt:/var/www/public_html/vendor/pear/pear-core-minimal/src:/var/www/public_html/vendor/pear/pear_exception:.:/usr/share/pear:/usr/share/php:/usr/share/pear:/usr/share/php') in /var/www/public_html/vendor/composer/autoload_real.php:45
That doesn't rule-out caching somewhere as the underlying issue, but it also seems like there are several discrete issues being reported here, mine was the exact same as the original reported issue.
I had the exact same error as the one reported by @/bobburns. Removing the vendor
directory and running composer install
fixed the issue for me.
stephenplatz β created an issue.
stephenplatz β created an issue.
The Drupal\Component\Plugin\Exception\PluginNotFoundException will occur if you haven't run the change_source_name
post update.
We're having the exact same issues as @elisseck, https://www.drupal.org/project/oauth2_server/issues/3236329 β does not solve them, but the fix in #2 π Client could not be found in edge case login workflow Active above (applied manually to 2.0.0-beta4) does solve the issue for us as well.
I can see now why this isn't possible because of the nature of webform entities, which I'm reminded now aren't content entities.
stephenplatz β created an issue.
stephenplatz β created an issue.
@rodolfo_manut the explanation is pretty clear in the above post by @alarcombe
This is described in the README and the webform_node_element_example module contains a working example.
If you look at the ExampleEventSubscriber
class in the webform_node_element_example
module you will see that this is demonstrated.
I'm not sure if this is the same issue, I'm using PHP 8.1. The following always results in a Division by Zero error:
numerator:
'#type': number
'#title': Numerator
'#states':
visible:
':input[name="metric_type"]':
value: Percentage
denominator:
'#type': number
'#title': Denominator
'#states':
visible:
':input[name="metric_type"]':
value: Percentage
'#min': 1
calculated_percentage:
'#type': computed_twig
'#title': 'Calculated %'
'#title_display': none
'#description_display': invisible
'#template': '{{( data.numerator / data.denominator )}}'
This is also the case using the number_format
filter.
Be sure to enclose the call to drupal_block
in the proper delimiters for Twig:
<div>
{{ drupal_block('system_branding_block') }}
{{ include("@responsive_menu/responsive-menu-off-canvas.html.twig") }}
</div>
stephenplatz β made their first commit to this issueβs fork.