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:
- HtmlElementAuditor - to check rendered HTML elements
- LinkAuditor - to check rendered links
- ParagraphLengthAuditor - to check rendered text
- ValidHtmlAuditor - to check the HTML of a rendered page
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 "
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 ("
You could also use the personalization preview parameters in the query string of the request template to preview the page as a given persona:
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.
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
The name of the credentials
The credentials class name, should be
The host or domain name for the credentials
The scheme (e.g. http, https, ...)
The default value for
The user name
The user's password
The default value for
Here is an example from the SEO module. You can find this configuration here:
RenderingFetcher renders content by directly invoking the Magnolia rendering engine and capturing the results.
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: