Closed (fixed)
Project:
Resizable Body
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2009 at 10:25 UTC
Updated:
15 Oct 2010 at 22:54 UTC
Hi, first, thanks for this great module!
When load a content type settings form, Resizable settings are restored to their default values at least for comment textarea. Which means if I click the submit button, my customized settings are gone.
I'm only using the base module, not the CCK one, cause I only modify comment textarea dimensions.
I guess it has something to do with the following function, nut I have no time now to digg:
function resizable_body_node_type($op, $info) {
if ($op == 'delete'){
variable_del('resizable_body_rows_' . $info->type);
variable_del('resizable_body_cols_' . $info->type);
variable_del('resizable_body_resizable_' . $info->type);
variable_del('resizable_body_split_' . $info->type);
variable_del('resizable_body_crows_' . $info->type);
variable_del('resizable_body_ccols_' . $info->type);
variable_del('resizable_body_cresizable_' . $info->type);
}
elseif ($op == 'update'){
// get old content type variables
$v1 = variable_get('resizable_body_rows_' . $info->oldtype, 12);
$v1_5 = variable_get('resizable_body_cols_' . $info->oldtype, 60);
$v2 = variable_get('resizable_body_resizable_' . $info->oldtype, TRUE);
$v3 = variable_get('resizable_body_split_' . $info->oldtype, TRUE);
$v4 = variable_get('resizable_body_crows_' . $info->oldtype, 5);
$v4_5 = variable_get('resizable_body_ccols_' . $info->oldtype, 60);
$v5 = variable_get('resizable_body_cresizable_' . $info->oldtype, TRUE);
// delete them
variable_del('resizable_body_rows_' . $info->type);
variable_del('resizable_body_cols_' . $info->type);
variable_del('resizable_body_resizable_' . $info->type);
variable_del('resizable_body_split_' . $info->type);
variable_del('resizable_body_crows_' . $info->type);
variable_del('resizable_body_ccols_' . $info->type);
variable_del('resizable_body_cresizable_' . $info->type);
// and rename to new content type variables
variable_set('resizable_body_rows_' . $info->type, $v1);
variable_set('resizable_body_cols_' . $info->type, $v1);
variable_set('resizable_body_resizable_' . $info->type, $v2);
variable_set('resizable_body_split_' . $info->type, $v3);
variable_set('resizable_body_crows_' . $info->type, $v4);
variable_set('resizable_body_ccols_' . $info->type, $v4);
variable_set('resizable_body_cresizable_' . $info->type, $v5);
}
}
Comments
Comment #1
George2 commentedi don't have as much time as i'd like, but i'm guessing only the rows and resizable (grippie/auto etc) options are saved, the col count not being saved for comments. so change the last but one line of the function from:
variable_set('resizable_body_ccols_' . $info->type, $v4);
to
variable_set('resizable_body_ccols_' . $info->type, $v4_5);
if that fixes it, i'll commit it.
Comment #2
jchatard commentedThank you, I'll test this ASAP.
And tell you.
Jérémy
Comment #3
drupalina commentedI think the fact that it doesn't work for comments (which I reported here http://drupal.org/node/522804) , is related to the this issue -- namely that it doesn't save the preferences in the resizable comments fieldset. For example , I would like to have "Autoresize with animation", but the settings always default to "Manual - show grippie".
Comment #4
George2 commentedplease download the dev when it's built and try that.
Comment #5
George2 commentedassuming this is fixed now.
Comment #6
virtualdrupal commentedI'm experiencing this same issue on comments, I set the grippie to none, and when I go back and edit the content type it's back to show manual. Using the latest DEV
Comment #7
rkarajgi commented@subscribing. I am experiencing same issue.
Comment #8
betoaveigaMe too...