Problem/Motivation

User could not saveee proofile data and receive error

The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\Core\Field\WidgetBase::massageFormValues() must be of the type array, string given, called in /var/www/html/core/lib/Drupal/Core/Field/WidgetBase.php on line 390 in Drupal\Core\Field\WidgetBase->massageFormValues() (line 537 of core/lib/Drupal/Core/Field/WidgetBase.php).
Drupal\Core\Field\WidgetBase->massageFormValues('', Array, Object) (Line: 390)
Drupal\Core\Field\WidgetBase->extractFormValues(Object, Array, Object) (Line: 232)
Drupal\Core\Entity\Entity\EntityFormDisplay->extractFormValues(Object, Array, Object) (Line: 338)
Drupal\Core\Entity\ContentEntityForm->copyFormValuesToEntity(Object, Array, Object) (Line: 336)
Drupal\Core\Entity\EntityForm->buildEntity(Array, Object) (Line: 159)
Drupal\Core\Entity\ContentEntityForm->buildEntity(Array, Object) (Line: 190)
Drupal\Core\Entity\ContentEntityForm->validateForm(Array, Object)
call_user_func_array(Array, Array) (Line: 82)
Drupal\Core\Form\FormValidator->executeValidateHandlers(Array, Object) (Line: 273)
Drupal\Core\Form\FormValidator->doValidateForm(Array, Object, 'profile_profile_edit_form') (Line: 118)
Drupal\Core\Form\FormValidator->validateForm('profile_profile_edit_form', Array, Object) (Line: 589)
Drupal\Core\Form\FormBuilder->processForm('profile_profile_edit_form', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 61)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit') (Line: 107)
Drupal\profile\Controller\UserController->editForm(Object) (Line: 47)
Drupal\profile\Controller\UserController->singlePage(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Go to edit profile page and try to save

Proposed resolution

The problem is in the `social_profile_tag_split` widget. We should add validation process from parent if condition $profile_tag_service->allowSplit()is false.

Comments

tBKoT created an issue. See original summary.

tbkot’s picture

Priority: Normal » Major
Status: Active » Needs review
tbkot’s picture

ribel’s picture

Title: Profile error: User can't save changes » User can't save profile when profile tagging is enabled
Status: Needs review » Reviewed & tested by the community

PR was merged and will be released in version 10.2.2

  • ribel committed 403097c on 10.2.x authored by tBKoT
    Issue #3224828 by tBKoT: Fix profile save process when profile tagging...
navneet0693’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, everyone! This will be included in OpenSocial 10.2.2 onwards.

  • tBKoT authored 1bfb986 on 10.3.x
    Issue #3224828 by tBKoT: Fix profile save process when profile tagging...

Status: Fixed » Closed (fixed)

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