Closed oanalavinia closed 3 years ago
Starting with #14, the UI was changed and the file macro parameter will have a different signification depending on the XWiki version. If the url is not directly specified, the attachment reference can be taken either directly from the file macro parameter for XWiki versions starting with 11.5, since an attachment picker is used, or by using both the file and document parameters.
For being compatible with all types of PDF file definition, the following logic is applied, in this order:
Reopening it since the proposed fix didn't covered some cases.
Steps to reproduce
Expected result The uploaded document1.pdf is displayed
Actual result An error appears, since the document is taken from the current document, instead of the document specified in the attachment picker
Even if the description of the macro parameters explain that the current document will be considered when there is no document added in the document macro parameter, I find it strange that this is needed since I am selecting a pdf along with it's parent from the drop down. From my point of view, the attachment picker should replace the need for the second macro parameter.
Note that this is the case only starting with XWiki version 11.5 #14 and on older versions there are no inconsistencies (since the attachment picker is not present)
Tested with XWiki version 12.10.4, Macro PDF Viewer version 2.2.1