Configuration¶
You can find the standard configuration in
EXT:linkvalidator/Configuration/TsConfig/Page/pagetsconfig.tsconfig.
This may serve as an example on how to configure the extension for your needs.
Minimal Configuration¶
It is recommended to at least fill out httpAgentUrl and httpAgentEmail.
The latter is only required if $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
is not set.
mod.linkvalidator.linktypesConfig.external.httpAgentUrl =
mod.linkvalidator.linktypesConfig.external.httpAgentEmail =
Reference¶
You can set the following options in the TSconfig for a page (e.g. the
root page) and override them in user or groups TSconfig. You must
prefix them with mod.linkvalidator, e.g.
mod.linkvalidator.searchFields.pages = canonical_link.
searchFields.[key]¶
Property
searchFields.[key]
Data type
string
Description
Comma separated list of table fields in which to check for broken links. Linkvalidator only checks fields that have been defined in
searchFields.Linkvalidator ships with sensible defaults that work well for the TYPO3 core, but additional third party extensions are not considered.
Warning
Currently, Linkvalidator can only detect links for fields having at least one softref set in their TCA configuration.
For this reason, it is currently not possible to check for pages.media. This will be fixed in the future.
Examples for working fields:
- pages.canonical_link
- pages.url
Examples for not working fields:
- pages.media
Examples
Only check for bodytext in tt_content:
tt_content = bodytext
Default
pages = media,url
tt_content = bodytext,header_link,records
linktypes¶
Property
linktypes
Data type
string
Description
Comma separated list of link types to check.
Possible values:
db: Check links to database records.
file: Check links to files located in your local TYPO3 installation.
external: Check links to external files.
linkhandler: Check links provided by the extension “linkhandler”.
This list may be extended by other extensions providing a linktype checker.
Default
db,file,external
linktypesConfig.external.httpAgentName¶
Property
linktypesConfig.external.httpAgentName
Data type
string
Description
Add descriptive name to be used as ‘User-Agent’ when crawling external URLs.
Default
TYPO3 Linkvalidator
linktypesConfig.external.httpAgentUrl¶
Property
linktypesConfig.external.httpAgentUrl
Data type
string
Description
Add URL to be used in ‘User-Agent’ when crawling external URLs.
Default
linktypesConfig.external.httpAgentEmail¶
Property
linktypesConfig.external.httpAgentEmail
Data type
string
Description
Add descriptive email used in ‘User-Agent’ when crawling
external URLs. If none is set here,
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']
is used.
Default
showCheckLinkTab¶
Property
showCheckLinkTab
Data type
boolean
Description
If set, the backend module shows a “Check Links” tab, which you can use to perform the checks on demand.
The Check links tab is visible
Note
Depending on the number of page levels to check and on the number of links in these pages, this check can take some time and need some resources. For large sites it might therefore be advisable to hide the tab.
Note
Linkvalidator uses a database table to store information about the broken links, which it found in your website. If showCheckLinkTab is set to 0, you must use the scheduler task provided by linkvalidator to update this information.
Default
1
mail.fromname¶
Property
mail.fromname
Data type
string
Description
Set the from name of the report mail sent by the cron script.
Default
Install Tool
defaultMailFromName
mail.fromemail¶
Property
mail.fromemail
Data type
string
Description
Set the from email of the report mail sent by the cron script.
Default
Install Tool
defaultMailFromAddress
mail.replytoname¶
Property
mail.replytoname
Data type
string
Description
Set the replyto name of the report mail sent by the cron script.
mail.replytoemail¶
Property
mail.replytoemail
Data type
string
Description
Set the replyto email of the report mail sent by the cron script.
mail.subject¶
Property
mail.subject
Data type
string
Description
Set the subject of the report mail sent by the cron script.
Default
TYPO3 Linkvalidator report
Hint
The following are advanced settings. In most cases, the defaults should be sufficient.
linktypesConfig.external.headers¶
Property
linktypesConfig.external.headers
Data type
array
Description
Additional set of HTTP headers to be passed when crawling URLs.
Default
linktypesConfig.external.method¶
Property
linktypesConfig.external.headers
Data type
array
Description
This specified which method is used for crawling URLs. By default, we use HEAD (which falls back to GET if HEAD fails).
You can use GET as an alternative, but keep in mind that HEAD is a lightweight request and should be preferred while GET will fetch the remote web page (within the limits specified by range, see next option).
“The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response.” (w3 RFC2616).
Default
HEAD
linktypesConfig.external.range¶
Property
linktypesConfig.external.headers
Data type
string
Description
Additional HTTP request header ‘Range’ to be passed when crawling URLs. Use a string to specify the range (in bytes).
Default
0-4048
Example¶
mod.linkvalidator {
searchFields {
pages = url,canonical_link
tt_content = bodytext,header_link,records
}
linktypes = db,file,external
checkhidden = 0
mail {
fromname = TYPO3 Linkvalidator
fromemail = no_reply@mydomain.com
replytoname =
replytoemail =
subject = TYPO3 Linkvalidator report
}
external {
httpAgentUrl = https://example.com/info.html
httpAgentEmail = info@example.com
}
}