This can't be a bug or other people would be reporting it. But does anyone have any thoughts on what might be happening?
A consent form is created, and a field referencing it added to the user account fields. It is showing when creating a new user as an admin. When registering one's own account, as an anonymous user, it however displays no text, field, or checkbox and gives an error when submitting the form. Inspection of the HTML reveals this empty, if class and ID heavy, div:
<div class="field--type-gdpr-user-consent field--name-field-consent field--widget-gdpr-consent-widget js-form-wrapper form-wrapper" data-drupal-selector="edit-field-consent-wrapper" id="edit-field-consent-wrapper"></div>
And the error when submitting:
This value should not be null.
All the templates are from Drupal core's 'stable' theme directly; no overrides on the user registration form or for any form elements.
I've enabled any potentially related GDPR permissions, and confirmed there's no field permissions module installed.
I've triple-checked that the GDPR Consent field is in the displayed section of Manage Form Display and Manage Display of user accounts, and there are no custom display settings.
And, of course, i've cleared caches 150 times.
Any ideas?
Comments
Comment #2
baluertlHi Benjamin, your issue is set to 8.x-2.x-dev, which is only kept as kind of placeholder for the future port of Drush 9.
However, AFAIK the spearhead of the current development more happens on the 8.x-1.x branch instead. Do you experience the same with this dev version, please?
Comment #3
mlncn commentedSorry this was actually with alpha11
Comment #4
volegerComment #5
volegerThis #2980349: [GDPR Consent] Fix resolving of user id for new users also will be related because even the field widget will be correctly rendered, the user ID recognition will detect NULL (but not correct ID of registered user)
Comment #6
volegerComment #7
baluertlIlma, could you please test it with the latest 1.x dev version to see if we can still reproduce the situation (empty div rendered on user/register form)?
Comment #8
kosa ilma commentedPatch from the issue: https://www.drupal.org/project/gdpr/issues/2980119 has been added, that should solve this.
Comment #9
kosa ilma commentedComment #10
baluertlComment #11
baluertlMoving issue state manually from Fixed 🠂 to Closed (fixed) in the hope that issue queue gets cleaner a bit.