Page tree
Skip to end of metadata
Go to start of metadata

(warning) Added in v5.6.2

Some auditors check on rendered content rather than the content node itself. These auditors need some way to get the content before checking it and use a "content fetcher" to retrieve the content for them. 

These auditors use content fetchers: 

Each of these auditors must have a content fetcher configured to carry out its checks.


RequestFetcher sends a preview request to Magnolia to render content and captures the page returned. You have to configure RequestFetcher to send a preview request through its configuration properties.


RequestFetcher has the following properties:



The template for the preview request. The template should have a placeholder "{0}" for the path of the selected content node being rendered.

If you set your own request template, the content node path substituted will always start with a "/". You don't need to add a "/" to separate the host name and port from the node path in your request template.

The default value of requestTemplate is:


Note that the default requestTemplate will send its preview request to the local Magnolia instance listening on port 8080.

Also, the query string of the request template specifies that it is a preview request ("mgnlPreview=true") and to render the page as if being viewed in a desktop browser ("mgnlChannel=desktop").

You could also use the personalization preview parameters in the query string of the request template to preview the page as a given persona:

http://localhost:8080{0}?previewPersona=<persona name>&mgnlPreviewAsVisitor=true



Defines a list of credentials (host, port, user name and password) when requesting rendered content. The credentials will be added to the preview request and will be available as preemptive basic authentication.

Note that accessing pages on the standard Magnolia author instance require authentication. You should configure credentials for accessing your local Magnolia author instance.

Configuring credentials

The targets nodes allows you to define one or more credentials that will be added to each preview request used to render content. You will probably have to define credentials for accessing links to your Magnolia instance if it is an author instance; pages and resources are protected with basic authentication. 

The credentials will be added by host, so more than one credentials can be added. 

Here is how to configure target credentials within your RequestFetcher configuration: 


 <target credentials name>


The name of the credentials



The credentials class name, should be



The host or domain name for the credentials



The port



The scheme (e.g. http, https, ...)

The default value for scheme is http.



The user name



The user's password



If true the credentials will be added to requests with preemptive basic authentication.

The default value for preemptive is true.


Here is an example from the SEO module. You can find this configuration here: /modules/seo/config/auditManager/auditors/deadLinks/fetcher

        host: localhost
        password: superuser
        port: 8080
        scheme: http
        user: superuser



RenderingFetcher renders content by directly invoking the Magnolia rendering engine and capturing the results. 

Since RenderingFetcher does not send a request to Magnolia. It may be slightly faster than RequestFetcher but may not correctly render the content when using personalization or sites. 

RenderingFetcher has no configuration properties. 


Here is an example RenderingFetcher configuration:

  • No labels