Error when value in XML source missing

Created on 29 July 2019, over 5 years ago
Updated 14 June 2023, over 1 year ago

I am attempting to import a large dataset in XML format. For two of the source values I am using two tampers to transform the data. One tamper transforms the date into a Unix timestamp and the second tamper transforms the timestamp to Date format. This works fine as long as the values exist.

However in some of the records the values are missing. When this happens the feed stops running and an error is generated. The error log message is: Drupal\tamper\Exception\TamperException: Input should be a string. in Drupal\tamper\Plugin\Tamper\StrToTime->tamper() (line 26 of /Applications/MAMP/htdocs/site/modules/tamper/src/Plugin/Tamper/StrToTime.php).

Is there a way to have the temper insert something like "n/a" if the source xml tag does not exist?

πŸ’¬ Support request
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States macuhail

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024