Perhaps someone can help out. We have started to have an issue with all of our File Notes in Notes module and Tasks. Text area field type is having a problem since we upgraded to v 7.12.5. Characters <<>>, <>, () and even / in some rare occasions combined with any of those is creating extra spaces on every save if there are already line breaks in between texts.
We have 60000 thousand records and File Notes and once these spaces and text reaches limit of text area size, they start deleting the text from beginning of the file while you add some new at the bottom.
To test this, just add new Task in v 7.12.5 and add <<>> or <> or () characters while you are having 2 lines of text separated with a line break and you will see the results.
Haven’t tested it there, but new 7.21.7 and 8.2.0 have that issue and several prior versions. We have upgraded to 7.12.5 from 7.11.18 which did not had that problem.
Major issue is <<>> or <> characters, () or / is occasional with certain files.
@vijay1992 Thanks for suggestion. I have tried to place the code under logic_hooks.php of Notes and Tasks where we have some Text Area fields but it does not work.
Added note and description Text Area fields to your code but nothing has happened.
To be more precise, I have created 2 files, one logic_hooks.php with:
code:<?php
// Do not store anything in this file that is not part of the array or the hook version. This file will
// be automatically rebuilt in the future.
$hook_version = 1;
$hook_array = Array();
// position, file, function
$hook_array[‘before_save’] = Array();
$hook_array[‘before_save’][] = Array(1, ‘trim_before_save_class’ , ‘custom/modules/Notes/trimDescField.php’ , ‘trim_before_save_class’ , ‘trim_before_save_method’);
?>
and another where the field name is stored with your code, trimDescField.php:
code:<?php
class trim_before_save_class{
function trim_before_save_method($bean, $event, $argument){
$bean->description = trim($bean->description);
}
}
?>
All of them are stored in custom/modules/Notes folder…