Database queries for insert, update and delete should use the new database abstraction layer rather than db_query. This is currently causing issues with multisite as values are not inserted into the database correctly in contemplate_refresh_files. It should be:
/**
* Refresh the listing of template files for the current site
*
* This refreshes the file listing whenever a ConTemplate admin screen is called
*/
function contemplate_refresh_files() {
$data = drupal_system_listing('/\.tpl\.php$/', 'contemplates', 'name', 0);
$conf = conf_path();
db_delete('contemplate_files')->condition('site', $conf)->execute();
if (!empty($data)) {
$fields = array('site' => $conf, 'data' => serialize($data));
db_insert('contemplate_files')->fields($fields)->execute();
}
}
Don't have time to roll a patch right now, but I'll look through for any other instances of this later and make one.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | contemplate.patch | 2.45 KB | justafish |
Comments
Comment #1
justafishThis patch removes deprecated database usage, enables disk based templates to work and changes a few pass-by-reference functions to pass-by-value.
Rolled against latest Contemplate D7 branch head.
Comment #2
jrglasgow commentedJustafish,
I have committed this patch. Are you interested in becoming a co-maintainer of this module. I could use the help.
Comment #3
justafishSure :)
Next patch I'm working on is addressing the $node->body['und']... related errors and it's currently inability to use viewable rendered fields in a template (or so I've found so far, need to check that)
Comment #4
rickmanelius commentedIs it worth keeping this issue open? Or is there a list of things todo for a 7.x-1.1 release?
Comment #5
rickmanelius commentedBTW, sweet, this works. Thanks!
Comment #6
rickmanelius commentedSeeing as there is both a stable and dev version available, this can probably be closed...