Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-24658

Component not always applying the priority

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.9
    • Component
    • None
    • Unknown

    Description

      Step to reproduce:

      • Create a new extension with only one simple class which extends DefaultPDFExportJobRequestFactory.
      • In components.txt add something like this 10:org.xwiki.example.CustomPDFExportJobRequestFactory. So we expected that this would override DefaultPDFExportJobRequestFactory
      • Install this extension on the main wiki.
      • Run this simple groovy script:
        {{groovy}}
        println services.component.getInstance(org.xwiki.export.pdf.job.PDFExportJobRequestFactory.class)
        println services.export.pdf.requestFactory
        {{/groovy}}
        

      Expected:

      The result of the groovy script is:

      org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
      org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
      

      Currently:

      The result of the groovy script is:

      org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
      org.xwiki.export.pdf.internal.job.DefaultPDFExportJobRequestFactory@2581a82e
      

      So it seem that that the custom class is not correctly loaded in the PDFExportScriptService.

      Workaround: if we install the extension in the farm + we reboot the instance it seem working as expected.

      Attachments

        Activity

          People

            Unassigned Unassigned
            josue Josué Tille
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: