🇳🇱Netherlands @EstherTempel

Account created on 24 September 2020, over 4 years ago
#

Recent comments

🇳🇱Netherlands EstherTempel

On a clean Drupal 10.2 installation I have tried patch #10 .

I was able to use the full URL to add an image from Unsplash. The description when adding an image explains that you can add an ID or the full URL, both with examples.
Also the 'Usage' section of the Readme file is updated, where it now also explains that the full URL can be used.

🇳🇱Netherlands EstherTempel

I tested both #11 patch and #13 patch on a Drupal 10.2 clean installation with webforms version 6.2.
What I noticed is that if you choose webform_entity_checkboxes, webform_entity_select and/or webform_entity_radios (this last one is added in patch #13) the label of the terms are correctly displayed.

However if you choose webform_term_select the values are empty, nothing is displayed.
And if you choose for instance webform_term_checkboxes (this element is not added in the patches) the ID is displayed instead of the label.

What I notices while debugging is that webform_term_select skips this part of the code:

if (isset($value) && !empty($value)) {
            if (isset($this->getElements()[$component]['#target_type'])) {
              $target_type = $this->getElements()[$component]['#target_type'];
              $entity_storage = \Drupal::entityTypeManager()->getStorage($target_type);
              $entity = $entity_storage->load($value);
              if (is_object($entity)) {
                $value_label = $entity->label();
              }
            }
          }
🇳🇱Netherlands EstherTempel

Thank you @roaldnel for your work on this patch. This is really helpful!

🇳🇱Netherlands EstherTempel

My previous patch gave another error for the LongAnswer because of the result_answer_id not being initialized.

🇳🇱Netherlands EstherTempel

The first patch gave an error because it could not acces the protected property. Therefore I changed it to public in this new patch.

🇳🇱Netherlands EstherTempel

I ran into the same issue where I was not able to add new content because of the 'Unsupported operand types' issue. The fix that Azwart mentioned worked for us. Therefore I added a patch.

Production build 0.71.5 2024