Active
Project:
Subsites
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2011 at 16:19 UTC
Updated:
4 May 2015 at 07:35 UTC
Jump to comment: Most recent
function subsites_update_7200() isn't quite ready for primetime. But here's a fix:
From (line 149):
$fid = db_query("SELECT 1 FROM {file_managed} WHERE url = :url", array(':url' => subsites_get_css_path($subsite->sid)))->fetchField();
if ($fid) {
db_update('subsites')
->fields(array(
'css_fid' => $fid
))
->condition('sid', $subsite->sid)
->execute();
}
To (line 149):
$fm_result = db_query("SELECT * FROM {file_managed} WHERE uri = :uri", array(':uri' => subsites_get_css_path($subsite->sid)))->fetchField();
$fm_file = array_shift($fm_result);
if (!empty($fm_file->fid)) {
db_update('subsites')
->fields(array(
'css_fid' => $fm_file->fid
))
->condition('sid', $subsite->sid)
->execute();
}
Comments
Comment #1
m4oliveiHello,
This issue and others are fixed in my patch over at:
http://drupal.org/node/800880
Thanks,
Matt
Comment #1.0
m4oliveiMissing )
Comment #2
chunty commentedAm I right in thinking there was an error still with your patch over at http://drupal.org/node/800880
I ended up with this at 184:
which I think should have been:
Comment #3
gisleThe number "7200" and above should be used for updates to the ver. 2 branch of the module - but no ver. 2 branch (i.e. 7.x-2.x) exists:
https://api.drupal.org/api/drupal/modules!system!system.api.php/function...