Closed (works as designed)
Project:
Feeds Tamper
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jun 2018 at 06:34 UTC
Updated:
14 Apr 2026 at 15:57 UTC
Jump to comment: Most recent
Comments
Comment #2
shane birley commentedI also just noticed (after posting) that it is referring to the Tamper module, I think.
Comment #3
megachrizThis can happen if you put certain tampers in a row or if the value coming from the import source is already an array. The Explode plugin expects a string as input.
Can you share your feed type and the data you are trying to import?
Comment #4
shane birley commentedThe CSV file I am using is a cleaned up export from an old Drupal 6 site. The terms I am attempting to import look like:
These are in a basic cell on the spreadsheet. I must be missing something basic here... just not seeing it.
Comment #5
megachrizMaybe you added tamper plugins for a source and later removed that source from the mapping? Therefore: can you provide an export of your feed type?
You can put one in a Features module or you can export it using the config manager.
Note: I'm about to commit a fix for the issue of tamper plugins that kept existing even after changing the mapping. See #2974289: Remove tamper plugin instances when source is removed.
Comment #6
shane birley commentedThere were a couple of times where the config for the tamper mapping "vanished". I thought maybe I had removed the config or had forgotten to save it. But when trying to figure out what was going on, I did add and remove the setup a couple of times as well. My problem might be what you've described.
Let me check out the patch and see if that makes a difference.
Comment #7
saratt commentedHi Shane,
Were you able to figure out what the problem was? I am running into the same issue.
Comment #8
shane birley commentedHey, @st55:
I haven't had a chance to test it as have been working on some other pieces of the project. I will test it over the next couple of days. I think the patch that @MegaChriz posted is actually the problem.
Have you applied the patch?
Comment #9
megachrizI assume #2974289: Remove tamper plugin instances when source is removed fixes this issue. If not, please reopen.
Comment #10
rongok commentedThe patch that @MegaChriz posted didn't fix the issue. Still get the error when exploding comma separated string and when converting string to unix time.
Comment #11
andrenoronha commentedI've got the same bug but when trying to use any plugin to any source. It always tells me that my piece of text is not a string (and it should be).
The most strange thing is that I have already imported with success lots of content from different feed types. And now even the old ones are bringing me the same problem.
Comment #12
philbi commentedThis issue can happen if the explode function is applied on an empty string.
Comment #13
rongok commentedIt works if the header name of the CSV is same as machine name of the source.
Comment #14
kobb commentedI'm sure that I missed something, and this is not best practice, but this modified Explode.php tamper function is a temporary fix for those in need.
The only change is the addition of the first if statement.
EDIT: I just realized this is the issue queue for feeds_tamper not tamper. This function is for the tamper module.
Comment #15
adamevertsson commentedI don't know if it helps, but I got multiple taxonomy term import via Feeds to work when I patched Feeds with the patch at https://www.drupal.org/project/feeds/issues/2453123
Don't need to user Feeds tamper for this with the patch (https://www.drupal.org/files/issues/2019-01-25/2453123-6.patch), actually if you add the Feeds tamper plugin Explode with the patch applied you get no result, but with no plugin applied to the data with many terms it works.
// Adam
Comment #16
bmenk commentedDid this ever get a more permanent fix than the little code snippet mentioned in #14? That works for me but of course will be an issue for new updates etc. I'm presently running 8.x-2.0-beta1 and it did not look like anything in the explode.php code had changed at all.
Thanks for any advice on a longer term fix.
Bobb Menk
Comment #17
AdrianoMoura commentedbest way to remove blanks in the return of Explode->tamper( ...
Comment #18
potassiumchloride commented@andrenoronha I'm having the same problem. I've been using Feeds and Feeds Tamper for months and now I suddenly have this issue. Any advice?
Comment #19
mslaxmeter commentedI can also confirm the issue. I have a feed set up to import CSV data, with an Explode tamper on a specific column.
When I import an empty or valid string it seems to work fine, but if I import a sheet that doesnt include the tampered column (I don't want to update items with an empty value), I get HTTP 500 during import and the same message as the reporter.
I agree this should be a fix put into the module instead of a custom code snippet.
Comment #20
mslaxmeter commentedComment #21
ericgsmith commentedLinking related issue in tamper module. It seems there is a lot of support to improve the handling of null values. Please see the issue Improve handling of empty data. It would be awesome if that issue could get some feedback.
The change in #14 is essentially part of that issue - I would also welcome that as a standalone patch in tamper module.
Comment #22
lissy commentedA Workarround is, to integrate the Tamper "Skip tampers on empty" and put it before the Explode-Tamper
Comment #23
ron collins commentedIn case this helps someone else, I got this error when I accidentally selected a mapping for a new blank source instead of a new CSV source.
Comment #24
benstallings commentedThere doesn't appear to be anything to review in this ticket.