This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-ff74022c-e4a1-4697-a584-9aa1fb450d16 XWIKI-24658 Open

Component not always applying the priority

 
View issue   ·   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-db4f34fb-60fc-4f61-8bd0-238370950a8b Josué Tille created this issue on 04/Aug/26 10:43
 
Summary: Component not always applying the priority
Issue Type: cid:jira-generated-image-avatar-ff74022c-e4a1-4697-a584-9aa1fb450d16 Bug
Affects Versions: 17.10.9
Assignee: Unassigned
Components: Component
Created: 04/Aug/26 10:43
Priority: cid:jira-generated-image-static-major-124370d4-12f5-4041-a3fe-9fec6df3f9d3 Major
Reporter: Josué Tille
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 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.

 
 

1 update

 
cid:jira-generated-image-avatar-db4f34fb-60fc-4f61-8bd0-238370950a8b Changes by Josué Tille on 04/Aug/26 10:43
 
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:
{code}
{{groovy}}
println services.component.getInstance(org.xwiki.export.pdf.job.PDFExportJobRequestFactory.class)
println  services.export.pdf.requestFactory
{{/groovy}}
{code}

Expected:

The result of the groovy script is:
{code}
org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
{code}

Currently:

The result of the groovy script is:
{code}
org.xwiki.example.CustomPDFExportJobRequestFactory@7c1c8420
org.xwiki.export.pdf.internal.job.DefaultPDFExportJobRequestFactory@2581a82e
{code}

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.