View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000132 | BwPostman | Newsletters Backend | public | 2020-03-16 11:31 | 2020-06-09 15:44 |
Reporter | dstreichert | Assigned To | Romana | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Product Version | 2.3 | ||||
Summary | 0000132: If the template to be used has a tpl_id = 0 and a paper_bg is stored in the database, then the wrong body tag is used. | ||||
Description | If the template to be used has a tpl_id = 0 and a paper_bg is stored in the database, then the wrong body tag is used. But again I have worked out a solution in version 2.3.1 that I would like to suggest here. I have attached a diff file to patch the file "/administrator/components/com_bwpostman/helpers/contentRenderer.php" in version 2.3.1. | ||||
Tags | No tags attached. | ||||
|
contentRenderer.php.diff (1,553 bytes)
--- contentRenderer.orig.php 2020-03-15 18:31:44.740774065 +0100 +++ contentRenderer.php 2020-03-16 11:07:46.276655997 +0100 @@ -950,13 +950,24 @@ $newtext .= ' </style>' . "\n"; $newtext .= ' </head>' . "\n"; - if (isset($tpl->basics['paper_bg'])) + if ($tpl->tpl_id !== '0') { - $newtext .= ' <body bgcolor="' . $tpl->basics['paper_bg'] . - '" emb-default-bgcolor="' . $tpl->basics['paper_bg'] . '" style="background-color:' . $tpl->basics['paper_bg'] . - ';color:' . $tpl->basics['legal_color'] . ';">' . "\n"; + $newtext .= ' <body '; + if (empty($tpl->basics['paper_bg'])) { + $newtext .= 'bgcolor="#ffffff" emb-default-bgcolor="#ffffff"'; + if(!empty($tpl->basics['legal_color'])) { + $newtext .= ' style="color:' . $tpl->basics['legal_color'] . '";'; + } + } else { + $newtext .= 'bgcolor="' . $tpl->basics['paper_bg'] . '" emb-default-bgcolor="' . $tpl->basics['paper_bg'] . '" style="background-color:' . $tpl->basics['paper_bg'] . ';'; + if (!empty($tpl->basics['legal_color'])) { + $newtext .= 'color:' . $tpl->basics['legal_color'] . ';'; + } + $newtext .= '"'; + } + $newtext .= '>' . "\n"; } else { $newtext .= isset($tpl->tpl_tags_body) && $tpl->tpl_tags_body == 0 ? $tpl->tpl_tags_body_advanced : BwPostmanTplHelper::getBodyTag(); |
|
Description and code mismatches! Wrong body tag is mentioned, if tpl_id = 0, but code changes only meets tpl_id != 0. tpl_id is != 0, if a predefined template is used, tpl_id = 0 meets all self created freestyle templates. There is no setting for paper_bg at the freestyle templates (tpl_id = 0), this setting only is in place for predefined templates. If one want to set "paper_bg" for freestyle templates, then the body tag at the tab expert settings has to be set correctly. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-03-16 11:31 | dstreichert | New Issue | |
2020-03-16 11:31 | dstreichert | File Added: contentRenderer.php.diff | |
2020-04-15 07:40 | Romana | Assigned To | => Karl |
2020-04-15 07:40 | Romana | Status | new => assigned |
2020-06-09 08:31 | Romana | Assigned To | Karl => Romana |
2020-06-09 09:34 | Romana | Note Added: 0000053 | |
2020-06-09 09:35 | Romana | Severity | major => minor |
2020-06-09 09:35 | Romana | Status | assigned => feedback |
2020-06-09 09:50 | Romana | Note Edited: 0000053 | View Revisions |
2020-06-09 15:44 | Romana | Status | feedback => resolved |
2020-06-09 15:44 | Romana | Resolution | open => no change required |