I added #2 patch to the fork, thanks
Aranzazu_dru β created an issue.
Aranzazu_dru β made their first commit to this issueβs fork.
Aranzazu_dru β made their first commit to this issueβs fork.
Aranzazu_dru β made their first commit to this issueβs fork.
Aranzazu_dru β made their first commit to this issueβs fork.
Aranzazu_dru β made their first commit to this issueβs fork.
I think that we need more information, maybe the ajax error or something like that to see where is the problem, anyways, I had the same problem when I tried to add the body field(or others in symfony mailer) and get and ajax error.
In my case it was because trying to add the field, Drupal tries to access information that (because is a new field without information) does not exist yet...
I have solved it by modifying the code in the "BodyEmailAdjuster.php" class just like this:
public function settingsForm(array $form, FormStateInterface $form_state) {
if(!empty($this->configuration['content'])){
$content = $this->configuration['content'];
$form['content'] = [
'#title' => $this->t('Content'),
'#type' => 'text_format',
'#default_value' => $content['value'],
'#format' => $content['format'] ?? filter_default_format(),
'#required' => TRUE,
'#rows' => 10,
'#description' => $this->t('Email body. This field may support tokens or Twig template syntax β please check the supplied default policy for possible values.'),
];
}else{
$form['content'] = [
'#title' => $this->t('Content'),
'#type' => 'text_format',
'#default_value' => '',
'#format' => filter_default_format(),
'#required' => TRUE,
'#rows' => 10,
'#description' => $this->t('Email body. This field may support tokens or Twig template syntax β please check the supplied default policy for possible values.'),
];
}
...
return $form;
}
However, you must see if the problem you have is with this class or not by debuggin or something.
I hope it helps you anyways!