Placeholders with exclamation mark (!placeholder) in t()-functions are no longer supported in Drupal 8: https://www.drupal.org/node/2575819

The name module uses these placeholders in various places, causing errors.

On top of that, the part of the code that checks whether all necessary components are filled in, contains an error:
$missing_components = array_diff($minimum_components, array_keys($item_components));
should be
$missing_components = array_diff(array_keys($minimum_components), array_keys($item_components));
Otherwise you get errors.

Patch included. I may have gone a bit overboard, but I replaced all !placeholders with @placeholders, I fixed the components validation error and I also changed the field-required error string to conform with the default field-required error strings.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gillesv created an issue. See original summary.

gillesv’s picture

Michelle’s picture

Status: Active » Needs review
Issue tags: -validation, -placeholder

I tested this and it works. Marking needs review so the test bot hits it.

Michelle’s picture

Version: 8.x-1.0-beta1 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

The bot likes it and it worked for me so marking RTBC. Would be good to get this in as it fixes a bunch of bugs.

rootwork’s picture

Patch continues to apply...

  • Alan D. committed 9d82b71 on 8.x-1.x authored by gillesv
    Issue #2715203 by gillesv, Michelle, rootwork, Alan D.: Validation...
Alan D.’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone

Just really about to use the module for the first time on a D8 project, so a series of patches will get pushed though :)

Status: Fixed » Closed (fixed)

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