Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix - Administración - Altura de IFrame no se recogía al cambiarla #502

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion modules/DynamicFields/DynamicField.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,13 @@ public function buildCache($module = false, $saveCache = true)
while ($row = $this->db->fetchByAssoc($result, false)) {
$field = get_widget($row['type']);

// STIC-Custom ART 20241203 - Height defined in iframe field not respected
// https://github.com/SinergiaTIC/SinergiaCRM/pull/502
if($row["type"] == 'iframe' && $saveCache->ext4 != $row["ext4"]){
$row["ext4"] = $saveCache->ext4;
}
// END STIC-Custom

foreach ($row as $key => $value) {
$field->$key = $value;
}
Expand Down Expand Up @@ -618,7 +625,10 @@ public function addFieldObject(&$field)
// (that will keep the original field definition). To do this, we've created a new function and will skip the original
// code, that will only apply on field creation.
$this->sticSaveExtendedAttributes($field, $fmd);
$this->buildCache($this->module);
// STIC-Custom ART 20241203 - Height defined in iframe field not respected
// https://github.com/SinergiaTIC/SinergiaCRM/pull/502
$this->buildCache($this->module, $field);
// END STIC-Custom

// STIC-Custom - There is a bug in SuiteCRM that requires the cache/themes to be manually rebuilt.
// https://github.com/salesagility/SuiteCRM/issues/9119
Expand Down Expand Up @@ -806,6 +816,12 @@ public function sticSaveExtendedAttributes($field, $fmd)
$to_save['default'] = htmlspecialchars_decode($field->ext4, ENT_QUOTES);
}
// END STIC-Custom
// STIC-Custom ART 20241203 - Height defined in iframe field not respected
// https://github.com/SinergiaTIC/SinergiaCRM/pull/502
if($field->type=='iframe' && ($field->ext4 != $fmd->ext4)) {
$to_save['ext4'] = (isset($field->ext4) ? $field->ext4 : '');
}
// END STIC-Custom
}

$bean_name = $beanList[$this->module];
Expand Down
Loading