- Issue created by @pearls
- 🇮🇳India mohd sahzad
mohd sahzad → made their first commit to this issue’s fork.
Thanks mohd. Tested. Now we have 2 issues. Here's the log.
Deprecated function: reset(): Calling reset() on an object is deprecated in lock_field_values_preprocess_field() (line 47 of /var/www/html/mysite/web/modules/contrib/lock_field_values/lock_field_values.module) #0 /var/www/html/mysite/web/core/includes/bootstrap.inc(166): _drupal_error_handler_real() #1 [internal function]: _drupal_error_handler() #2 /var/www/html/mysite/web/modules/contrib/lock_field_values/lock_field_values.module(47): reset() #3 [internal function]: lock_field_values_preprocess_field() #4 /var/www/html/mysite/web/core/lib/Drupal/Core/Theme/ThemeManager.php(261): call_user_func_array() #5 /var/www/html/mysite/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render() #6 /var/www/html/mysite/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender() #7 /var/www/html/mysite/web/core/modules/node/node.module(550): Drupal\Core\Render\Renderer->render() .....................
Error: Call to undefined method Drupal\Core\Field\BaseFieldDefinition::getFieldDefinition() in lock_field_values_preprocess_field() (line 50 of /var/www/html/mysite/web/modules/contrib/lock_field_values/lock_field_values.module).
- 🇮🇳India kulpratap2002
@pearls What do you mean by "I get the following PHP error when I do anything else with user" can you please ellaborate what are you doing with the user because i can't able to reproduce the issue in my site everything is working right on the User Interface.
There is a boolean field in user entity that triggers role assignment when it'ss value is on.There are also text fields that should not be changed.
In some scenarios, the administrator needs to lock these field for some users. I use the module for these fields. However, even if the administrator does not touch any of these field, It keeps giving the errors mentioned in the previous comment.
@kul, Thanks for support .Tested.
After MR!2, "Lock field values checkbox" disappeared .
You see that the Lock Values Checkbox does not appear when you try to edit a member profile.