This issue was previously reported multiple times, however, this time the issue is related to profile module.

With the latest version of the profile module 8.x-1.0, There is no profile_form_user_register_form_validate anymore and profile fields are being added through a widget.

Because of that, I'm reverting the profile integration in this PR:
https://git.drupalcode.org/project/multiple_registration/commit/b5542a89...

Since the profile integration is not needed anymore, here are the steps to attach a profile to a registration form:

  • Add a new form view mode to User entity "/admin/config/people/accounts/form-display"
  • Edit the newly created form view mode and add the profile widget.
  • Don't forget to select the correct from mode in multiple_registration settings page.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ahmed_Samir created an issue. See original summary.

Ahmed_Samir’s picture

Ahmed_Samir’s picture

Status: Active » Needs review
Ahmed_Samir’s picture

The previous patch is failing. attaching a new one..

gumrol’s picture

Thank you @Ahmed_Samir patch #4 works for me.

ysamoylenko’s picture

Status: Needs review » Needs work

Hello everyone,

The patch fixes the error, but it breaks the functionality related to profile creation.

So, changing the issue status to 'Needs work'.

coozila’s picture

patch < Unable_to_complete_user_registration_Entity_validation_was_skipped-3078446-3.patch
patching file multiple_registration.module
Hunk #1 succeeded at 17 with fuzz 2.
Hunk #3 FAILED at 294.
1 out of 3 hunks FAILED -- saving rejects to file multiple_registration.module.rej

coozila’s picture

i have tray also all version and get diferent error

BadMethodCallException: The "\Drupal\multiple_registration\Controller\MultipleRegistrationController::access" method is not callable as a _custom_access callback in route "/user/register/{rid}" in Drupal\Core\Access\CustomAccessCheck->access() (line 69 /core/lib/Drupal/Core/Access/CustomAccessCheck.php).

LogicException: Entity validation was skipped. in Drupal\Core\Entity\ContentEntityBase->preSave() (line 444 of html/core/lib/Drupal/Core/Entity/ContentEntityBase.php).

ericyellin’s picture

FileSize
165.78 KB

#4 installed fine and functionality *almost* works as expected.
The roles are assigned correctly to the, but you cannot select which profile is attached to which role. This means that in order to include the profile form in the registration form, you have to include all profile forms by selecting: "Include in user registration form" from the profile settings page. This is obviously not good since the idea is to be able to have users register to a profile that is connected to selected profiles and not *all* profiles.
Before the patch there was a: "Multiple registration pages" section in the profile settings where you could select which registration form is attached to which profile.
Attached is the profile edit section before the patch with the now missing part circled in red.

before patch

ericyellin’s picture

Sorry for the wrong info I wrote above (#9). After reviewing the instructions again and setting up everything correctly, it seems to work perfectly. No need for the setting within the profile settings, it's all done via the account settings as explained above. Quoting it here again in case anyone missed it:
- Add a new form view mode to User entity "/admin/config/people/accounts/form-display"
- Edit the newly created form view mode and add the profile widget.
- Don't forget to select the correct from mode in multiple_registration settings page.

Thanks!

Ahmed_Samir’s picture

Status: Needs work » Needs review

Hi @ysamoylenko,

I've tested this patch and it works for me,
@ericyellin confirmed this in comment #10

ysamoylenko’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
FileSize
63.17 KB
20.92 KB

Hi everyone,

Thanks for your patch and testing.

So, you are right, everything works as expected after applying the patch and steps provided from @ericyellin.

I just add some details to new profile attachment behaviour:
You need to add a profile widget with the widget type 'Profile form' to get the same behaviour as with the previous profile module version.

Screenshots:

The patch will be applied soon.

ysamoylenko’s picture

Status: Reviewed & tested by the community » Fixed

The patch was committed.

Thanks, everyone for your help with module development.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.