Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
When I try to import an XML-file that contains dates, that sometimes can be empty, the tamper called "String to Unix timestamp" causes an error when the field is empty.
Is there anyway to prevent this?
Comments
Comment #2
Anilu@I experience the same issue on a new Drupal 10 installation with Feeds Tamper 2.0@beta
I was able to sort this issue by using a rewrite plugin on top of "String to Unix timestamp." I used a token on the rewrite so I can use another field as default value. You can also use a "Set value or default value." Detail in https://www.drupal.org/project/feeds_tamper/issues/3029164
Them I set a conditional on the template so it does not render the default value.
Is not a full solutions but I work for now.
Comment #3
Anilu@Comment #4
Anilu@Ticket needs update
Comment #5
ericgsmith CreditAttribution: ericgsmith at Catalyst IT commentedAdding related issue. I feel like this probably could also be moved to the tamper issue queue if this is not specific to feeds tamper.
Thank you for sharing your work around analaura!
Comment #6
besek CreditAttribution: besek commentedComment #7
besek CreditAttribution: besek commentedThis fix from Tamper module:
https://www.drupal.org/project/tamper/issues/3119301
might be good solution. It provides new tamper "Skip tampers on empty". I've added this tamper to every field that I'm trying to manipulate and it works fine