Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi. I've created a rule that publish a facebook link when creating certain node of a content type.
The publication use the no aliased url (/node/xxx). I only see this option for url or path, in the rules action data set.
The problem is I,ve using Global Redirect, and i think it makes that in the thumbnail text of the facebook publication it displays the text "Page Not Found".
Is not possible to use the url alias, instead the internal url?
I attach the rule:
{ "rules_facebook_nuevas_m_quinas" : {
"LABEL" : "Facebook nuevas m\u00e1quinas",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules", "fb_autopost_entity" ],
"ON" : {
"node_insert--maquina" : { "bundle" : "maquina" },
"node_update--maquina" : { "bundle" : "maquina" }
},
"IF" : [ { "data_is" : { "data" : [ "node:language" ], "value" : "es" } } ],
"DO" : [
{ "entity_create" : {
"USING" : {
"type" : "facebook_publication",
"param_type" : "link",
"param_user" : [ "site:current-user" ]
},
"PROVIDE" : { "entity_created" : { "facebook_publication" : "Entidad creada" } }
}
},
{ "data_set" : {
"data" : [ "facebook-publication:field-facebook-link" ],
"value" : "[node:url]"
}
},
{ "data_set" : {
"data" : [ "facebook-publication:field-facebook-message" ],
"value" : "New machinery: [node:title]"
}
},
{ "publish_to_facebook" : {
"USING" : {
"publication" : [ "facebook-publication" ],
"pages" : "XXXXXXXXXXXX"
},
"PROVIDE" : { "facebook_publication_id" : { "facebook_publication_id" : "Facebook publication returned ID" } }
}
},
{ "data_set" : {
"data" : [ "facebook-publication:facebook-id" ],
"value" : [ "facebook-publication-id" ]
}
},
{ "entity_save" : { "data" : [ "facebook-publication" ] } }
]
}
}
Comments
Comment #1
mitchellresnick CreditAttribution: mitchellresnick as a volunteer commentedI'm having the same issue. Did you ever figure out a fix?