When you put the 3rd party WYSIWY field plugin into SuiteCRM - you put the field into the module (quotes in my case) and then enter values into the field - and it save properly.
Then when you put that field variable into a PDF template - the PDF generates and the HTML does not render - it prints the HTML markup.
please email [email protected] for the solution - our developer fixed the issue and we wish to share with the project to have it patched in the new release.
We have now set up a new home for suggestions at Trello. All github issues that were labeled 'suggestion' have been moved and will be closed. Certain ones will be progressed within the new Suggestion Box and may be re-opened.
Announcement of moving Suggestions:
https://suitecrm.com/forum/suggestion-box/13691-moving-suggestions-from-github-to
New SuiteCRM Suggestion Box
https://trello.com/b/Ht7LbMqw/suitecrm-suggestion-box
As for the fix proposed (5533dcb) I've added the code in 7.9.5 version of Suitecrm and it doesn't work.
Sorry I have opened a duplicate I think please see my experience with the bug here:
https://github.com/salesagility/SuiteCRM/issues/4436
This fix does not work. Using 7.9.9. However, if I downgrade to PHP 5.6 it works fine. Doesn't work in PHP 7+
I got this working in SuiteCRM 7.8.11 w/ PHP7 by editing modules/AOS_PDF_Templates/templateParser.php:
foreach ($focus->field_defs as $field_def) {
<SNIP>
+ } else if($field_def['type'] == 'wysiwyg') {
+ $repl_arr[$key . "_" . $field_def['name']] = html_entity_decode($focus->$field_def['name'], ENT_COMPAT, 'UTF-8');
+ $repl_arr[$key . "_" . $fieldName] = html_entity_decode($focus->$fieldName, ENT_COMPAT, 'UTF-8');
} else {
$repl_arr[$key . "_" . $fieldName] = $focus->$fieldName;
}
}
} // end foreach()
You're awesome!!!! Thanks so much. That one has been driving me crazy for a while! I can confirm this words with PHP 7
Dear @ApatheticCosmos ,
Very Good news ! I was hoping for this feature to work.
Do you think you can propose a PR for it to be included in next patched release ?
Alright, I'm going to attempt to create a Pull Request for this. I haven't done it on github before.
I've created a PR.
It works!
I have just copied and past the modified file on my 7.8.18
Note, for some reason there is not the end of the file "?>" here : https://github.com/ApatheticCosmos/SuiteCRM/blob/aac97a311ddb4e8fcb24d693c5ee26be1ec079b8/modules/AOS_PDF_Templates/templateParser.php
Thanks for this wonderfull patch ;)
Dear @ApatheticCosmos ,
After updating to 7.8.20 it doesn t fixe the problem.
It overwrite your fixe I had copied manually from here : https://github.com/ApatheticCosmos/SuiteCRM/blob/aac97a311ddb4e8fcb24d693c5ee26be1ec079b8/modules/AOS_PDF_Templates/templateParser.php
I had to copy your patch again after update to get it to work again .
Please reopen.
@hubyhuby See pull request #5989
It hasn't been merged yet, which is why it got overwritten with the last upgrade.