Creating rule to update node title When a visitor registers on my site, I have a set of rules that create several nodes. One of those nodes is a photo gallery.

The rule for the creation of the gallery title, includes the following: [account:name]'s Photo Gallery and that works fine.

But if the user changes his name later on, the name on the photo gallery is not updated.

I have been struggling with the creation of a rule to do just that but I haven't found the option or configuration that allows me to update the node title.

Any help on this would be greatly appreciated.

Thanks. :)
You could do that with Rules.


Add a new Reaction Rule (e.g: Update user gallery title)
Event: "After updating an existing user account"
Action: "Fetch entity by property":

type = node
title = [account:name]'s Photo Gallery

Loop over 'list item' and add action
Action: "Set data value": Set list_item item title
Save list_item.


Update: rule export:

{ "rules_update_gallery_title" : {
    "LABEL" : "Update user gallery title",
    "PLUGIN" : "reaction rule",
    "REQUIRES" : [ "rules" ],
    "ON" : [ "user_update" ],
    "DO" : [
      { "entity_query" : {
          "USING" : {
            "type" : "node",
            "property" : "title",
            "value" : "[account-unchanged:name]\u0027s gallery"
          },
          "PROVIDE" : { "entity_fetched" : { "entity_fetched" : "Fetched entity" } }
        }
      },
      { "LOOP" : {
          "USING" : { "list" : [ "entity-fetched" ] },
          "ITEM" : { "list_item" : "Current list item" },
          "DO" : [
            { "data_set" : {
                "data" : [ "list-item:title" ],
                "value" : "[account:name]\u0027s gallery"
              }
            },
            { "entity_save" : { "data" : [ "list-item" ], "immediate" : 1 } }
          ]
        }
      }
    ]
  }
}