[xwiki/xwiki-platform] 660223: XWIKI-25278: Make the export action extensible
Branch: refs/heads/XWIKI-25278 Home: https://github.com/xwiki/xwiki-platform Commit: 660223fadaab672a6b5505de372b486fc6228c37 https://github.com/xwiki/xwiki-platform/commit/660223fadaab672a6b5505de372b4... Author: Marius Dumitru Florea <[email protected]> Date: 2026-10-14 (Wed, 14 Oct 2026) Changed paths: A xwiki-platform-core/xwiki-platform-export/xwiki-platform-export-pdf/xwiki-platform-export-pdf-default/src/main/java/org/xwiki/export/pdf/internal/PrintPreviewExportFormatHandler.java M xwiki-platform-core/xwiki-platform-export/xwiki-platform-export-pdf/xwiki-platform-export-pdf-default/src/main/resources/META-INF/components.txt A xwiki-platform-core/xwiki-platform-export/xwiki-platform-export-pdf/xwiki-platform-export-pdf-default/src/test/java/org/xwiki/export/pdf/internal/PrintPreviewExportFormatHandlerTest.java M xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ExportAction.java A xwiki-platform-core/xwiki-platform-oldcore/src/main/java/org/xwiki/export/ExportFormatHandler.java M xwiki-platform-core/xwiki-platform-oldcore/src/test/java/com/xpn/xwiki/web/ExportActionTest.java Log Message: ----------- XWIKI-25278: Make the export action extensible * Add the `org.xwiki.export.ExportFormatHandler` component role, used by the export action to handle the export format specified by the format request parameter (xar by default). A handler can provide a new export format or overwrite a native one, and validates the export request (the default implementation accepts only POST requests). The export request is passed as a container `Request`, since `XWikiRequest` is deprecated. * Put the requested document revision in the context before calling the export format handler. * Fall back on the native export formats when the export format handler fails to be loaded. * Provide a handler for the html-print export format, used by the PDF export print preview, that accepts GET requests. Since XWIKI-23800 the export action refused the print preview requests made by the browser generating the PDF, so the requested document revision was ignored and the response had a 405 status and the X-FRAME-OPTIONS: DENY header, which breaks the client-side PDF export. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications
participants (1)
-
XWiki Notifications