Replication Status is always rendered as NOT_ACTIVATED when downloading the Report as CSV
Required Information
- [X] AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEM 6.5.12
- [X] ACS AEM Commons Version: 5.0.14
- [X] Reproducible on Latest? yes, tested also in 5.2.0
Expected Behavior
When downloading a report as CSV the "Replication Status Column" (documentation) must show the same value than in the HTML rendered report.
Actual Behavior
When downloading a report as CSV the "Replication Status Column" always shows the status "NOT_ACTIVATED"
After debugging the code this is what I found:
- PageReplicationStatusModel -> getReplicationStatus() ignores the Resource that is passed as a parameter: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/models/PageReplicationStatusModel.java#L104
- Instead it uses the resource that represents the Replication Status Column (the column definition).
- ReplicationStatus is null and the default value "Status.NOT_ACTIVATED" is used.

Steps to Reproduce
- Navigate to ACS Commons Reports: /apps/acs-commons/content/reports.html
- Open the sample Page Report: /editor.html/var/acs-commons/reports/sample-page-report.html
- Select the "Path" of a known site, for instance: /content/we-retail (make sure that there are published pages)
- Click on "Execute Report.
- Click on "Download Report"
- Compare the Replication Status Column.
Links
- Report Builder, Replication Status Column documentation: https://adobe-consulting-services.github.io/acs-aem-commons/features/report-builder/configuring.html
- ReportCSVExportServlet code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/internal/ReportCSVExportServlet.java#L165
- PageReplicationStatusModel code: https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/reports/models/PageReplicationStatusModel.java#L104
Fixed with https://github.com/Adobe-Consulting-Services/acs-aem-commons/pull/2820
Fixed with #2820
Thank you!
Fixed in 5.3.0
This issue still exists with version 5.3.0 - Can this task be re-opened ?
Sure - can you PR a fix when you have a moment? Might be helpful to post your AEM version and ACS Commons version as well - since this was fixed before and now seems to have broken again; will be interesting to understand the cause a bit more.