Problem/Motivation
I want to set revision log message to contain the time of the import. Rewrite plugin shows the list of patterns that is support , including "[parent:imported]", but none of those "parent" patterns are replaced. Leaving the "[parent:*]" patterns in the text.
Steps to reproduce
Proposed resolution
Move all parent properties to a new "Supported replacement patterns" heading on the form , with additional note to make it clear that the values will be replaced only if the property was used in a mapping.
Remaining tasks
Agree on proposed resolution
patch
review
commit
User interface changes
Split available tokens into two groups, available and supported.
API changes
None.
Data model changes
None.
Issue fork feeds_tamper-3324724
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
rosk0Based on #3332114: Missing parent properties on a feeds item -
parentproperties listed as Available replacement patterns on the plugin configuration form are actually only available if was explicitly used in the feed type mapping.This is very misleading.
I propose to move all
parentproperties to a new "Supported replacement patterns" heading on the form , with additional note to make it clear that the values will be replaced only if the property was used in a mapping.Comment #3
megachrizIt is a good idea to document that currently certain sources cannot be used unless they are used in mapping.
The quickest way to add that is to display that information for every Tamper plugin. This is because Feeds Tamper doesn't know which Tamper plugins act on the source list. Feeds Tamper just passes that information for every plugin.
An other solution would be that Tamper can tell Feeds Tamper that it actively uses the source list. Then Feeds Tamper would provide the information only for these plugins.
One step further would be that Tamper tells Feeds Tamper which sources are used. Feeds Tamper could then use that information to fetch the necessary data. In this case no documentation is needed as then the "parent" values will automatically become available.
Another step further would be that Feeds checks if the data that Tamper requests is provided by a FeedsSource plugin. And then automatically load it. In this case no changes in Tamper and Feeds Tamper are necessary for this issue.
Comment #4
kopeboySame issue seems resolved and RTBC for Drupal 7: https://www.drupal.org/project/feeds_tamper/issues/2632056
Comment #5
megachrizI plan to work on this in the next few weeks.
Comment #7
megachrizI've provided a solution for this issue! Even though the tests are not passing yet, this is now ready for review and testing.
It works as follows:
Be sure to test it in combination with #3541447: Make Tamper plugins tell which properties they use of a tamperable item. That issue provides changes for the Tamper module, so that plugins can provide a list of source fields that they use. Changes don't apply on the latest Tamper release, so you should apply them on the dev release. The Tamper dev release also contains other improvements for the Rewrite plugin.
Comment #8
megachrizI merged the code!