Closed (fixed)
Project:
Rules
Version:
6.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Aug 2009 at 10:14 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
klausiOK, this actually isn't related to cloning, but to rules_core_node_label_callback()
Shorter to reproduce:
1) Add a new triggered rule, event "After saving new content"
2) Add an action "Publish content"
4) Edit the action and save it without changes
5) The label has now the strange name "Publish created created content"
6) Edit and save the action again, the label is now "Publish created created created content"
Comment #2
klausiHere is a patch that partially fixes the issue: if the label already contains the name of the content variable (e.g. "created content"), then no str_replace() is done to the label.
This does not work if the content variable is changed (e.g. from "updated content" to "unchanged content"), where the bug is still present.
Maybe we should think about just removing the label callback from rules and leaving "content" unchanged.
Comment #3
klausiUrgs, this is just a simple call by reference bug: a '&' was missing, so any savings to $element['#info']['label_skeleton'] had no effect. Thx to fago for pointing out that possibility.
New patch attached, adds only one character :-)
Comment #4
fagough, thanks for tracking this down. I added a comment why we need the reference there and committed it.