- 🇨🇦Canada jaypan Victoria, BC
Here's a patch for 8.x-1.x for a stopgap, as the merge request is for the -dev branch.
When "Retroactive update" on filefields in nodes with revisions, only the last revision gets updated.
This happens because even if in filefield_filefield_paths_batch_update()
retrieves the correct list with nodes, in filefield_paths_batch_update()
the list is flatten using array_unique()
.
Possible solution
Retrieve also vid in object list:
function filefield_filefield_paths_batch_update($field, $type, &$objects) {
$field = content_fields($field, $type);
$db_info = content_database_info($field);
$result = db_query(
"SELECT c.nid, c.vid FROM {%s} c LEFT JOIN {node} n ON c.nid = n.nid WHERE c.%s IS NOT NULL
AND n.type = '%s'", $db_info['table'], $db_info['columns']['fid']['column'], $type
);
// Build array of Node IDs.
while ($node = db_fetch_object($result)) {
$objects[] = $node->nid . ':' . $node->vid;
}
}
and...
function filefield_filefield_paths_update($oid, $field) {
list($nid, $vid) = explode(':', $oid);
$node = node_load($nid, $vid);
$content_type = content_types($node->type);
...
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Here's a patch for 8.x-1.x for a stopgap, as the merge request is for the -dev branch.