You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a "previous approved version" is shown, the banner shows a second line with the "showApproved() message", which is in a sense a true statement, but, contradictary to the message in the next line, stating, "This is an old revision of the document!" (lang/showrev.txt). Also it is flagged green, which is misleading, since this document should not be used anymore.
The bug is a missing condition in the header (if condition) of the "showApproved() function". I think, the condition:
if (!$this->hlp->isCurrentRevisionApproved()) {
return;
}
is too weak and causes the undesired conflicting message in the banner of the "previous approved version".
If I replace it by the following stronger condition in the header of the "showApproved() function":
global $ID;
$revision = $this->hlp->getRevision();
$latestApprovedRevision = $this->hlp->getLatestApprovedRevision();
if ($latestApprovedRevision != $revision) {
return;
}
(which was taken (and modified) from the "showLatestApprovedVersion() function"), I get the desired behaviour, which is:
the "showApproved() message" is STILL shown for the "latest approved version"
the "showApproved() message" is NOT shown for the "previous approved version"
That was my bug report for the publish plugin, which I think is great!
Thank you alot for maintaining it! Thumbs up! Christian
The text was updated successfully, but these errors were encountered:
Chris75forumname
changed the title
Bugreport - conflicting messages in the banner (showApproved()-Message is shown with previous approved version)
Bugreport - conflicting messages in the banner - showApproved()-Message is shown with previous approved version
Jul 21, 2021
Chris75forumname
changed the title
Bugreport - conflicting messages in the banner - showApproved()-Message is shown with previous approved version
Bugreport - conflicting messages in the banner: "showApproved() message" is shown in the banner of "previous approved version"
Jul 21, 2021
Hi,
When a "previous approved version" is shown, the banner shows a second line with the "showApproved() message", which is in a sense a true statement, but, contradictary to the message in the next line, stating, "This is an old revision of the document!" (lang/showrev.txt). Also it is flagged green, which is misleading, since this document should not be used anymore.
The bug is a missing condition in the header (if condition) of the "showApproved() function". I think, the condition:
if (!$this->hlp->isCurrentRevisionApproved()) {
return;
}
is too weak and causes the undesired conflicting message in the banner of the "previous approved version".
If I replace it by the following stronger condition in the header of the "showApproved() function":
global $ID;
$revision = $this->hlp->getRevision();
$latestApprovedRevision = $this->hlp->getLatestApprovedRevision();
if ($latestApprovedRevision != $revision) {
return;
}
(which was taken (and modified) from the "showLatestApprovedVersion() function"), I get the desired behaviour, which is:
That was my bug report for the publish plugin, which I think is great!
Thank you alot for maintaining it! Thumbs up! Christian
The text was updated successfully, but these errors were encountered: