Issue #3254575: Entities tokens might cause problems when field prefix is empty
3 unresolved threads
Merge request reports
Activity
added 1 commit
- 16644264 - Inject dependency since the error I met earlier was because of a typo
597 /** 598 * Checks if a field machine name is a token. 599 * 600 * @see https://www.drupal.org/project/drupal/issues/3254575 601 * 602 * @param string $value 603 * The machine name, not prefixed. 604 * @param array $element 605 * An array containing the structure of the 'field_name' element. 606 * @param \Drupal\Core\Form\FormStateInterface $form_state 607 * The current state of the form. 608 * 609 * @return bool 610 * Whether or not the field machine name is a token. 611 */ 612 protected function fieldNameIsAToken($value, $element, FormStateInterface $form_state) { changed this line in version 7 of the diff
83 84 * (optional) The entity field manager. 84 85 * @param \Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository 85 86 * (optional) The entity display repository. 87 * @param \Drupal\Core\Utility\Token|null $token 88 * (optional) The token service. 86 89 */ 87 public function __construct(EntityTypeManagerInterface $entity_type_manager, FieldTypePluginManagerInterface $field_type_plugin_manager, ConfigFactoryInterface $config_factory, EntityFieldManagerInterface $entity_field_manager = NULL, EntityDisplayRepositoryInterface $entity_display_repository = NULL) { 90 public function __construct(EntityTypeManagerInterface $entity_type_manager, FieldTypePluginManagerInterface $field_type_plugin_manager, ConfigFactoryInterface $config_factory, EntityFieldManagerInterface $entity_field_manager = NULL, EntityDisplayRepositoryInterface $entity_display_repository = NULL, Token $token = NULL) { changed this line in version 7 of the diff
added 345 commits
-
cd7d188c...c284ccad - 341 commits from branch
project:9.3.x
- 2b414713 - Checks if a field machine name is taken by a token when field_prefix is empty
- 1aad8334 - Add functional test
- a490d8ee - Inject dependency since the error I met earlier was because of a typo
- 9a213af8 - Definitively not a time to code
Toggle commit list-
cd7d188c...c284ccad - 341 commits from branch
736 736 $this->assertSession()->addressEquals($url); 737 737 } 738 738 739 /** 740 * Tests that a field machine name can't be equal to a token name. 741 */ 742 public function testTokenFieldName() { changed this line in version 7 of the diff
added 5781 commits
-
9a213af8...cd5bc868 - 5780 commits from branch
project:11.x
- 24247424 - Issue #3254575 by macsim: Collision between tokens and fields machine name
-
9a213af8...cd5bc868 - 5780 commits from branch
added 1 commit
added 1 commit
added 1 commit
added 1 commit
added 1 commit
added 1 commit
added 1 commit
added 1 commit
Please register or sign in to reply