Closed jenlampton closed 4 years ago
I tried it with system_transliterate_machine_name()
and it got really messy. It requires a language code, meaning the tamper would have different versions if the site had different languages, and I don't think that's what we want. I think replacing the colon alone might be a better way to go.
I've been thinking about @laryn's suggestion of saving the feeds_tamper config inside the feeds config objects instead of having them separate. This would hopefully solve this issue you've discovered plus also making the feeds clone action work how people expect it to work by also copying over the tamper instances.
Ooh, I like that idea!
@jenlampton @BWPanda I've got a PR to test https://github.com/backdrop-contrib/feeds_tamper/pull/9. It changes the structure of the config to store them in the feeds_importer mappings. This might help with @BWPanda other issue as well, not sure.
I can test it later today, I have a new feeds project to work on :)
@jenlampton have you had a chance to test the PR?
The fix for this was merged, should we close this issue?
Thanks so much for porting this module :) I use it heavily on almost all my sites with feeds :)
I'm setting it up for the first time on a backdrop site, trying to import videos from a YouTube channel RSS feed using the
feeds_xpathparser
module. I want to use Tamper to hard-code a field value (instead of pulling from source). I chose the "Plugin"Set value or default value
and entered my preferred value. Immediately on clickingAdd
I get an error:I also tried the
Rewrite
plugin, but had the same problem.I expect the problem is with the colon added by the
feeds_xpathparser
module to the source name, which I think may be an invalid character in a machine name.I have a PR that replaces the colon with a hyphen, but maybe we should use something like
system_transliterate_machine_name()
to make sure we catch all possible bad characters?