Setup quickstart

Steps

  1. Editor configuration

    Give your backend users / user groups permission to the "Check Links" (web_brofix) module.

    Give backend users / user groups permission to the table tx_brofix_exclude_link_target, if they should be able to add URLs to the list of URLs not to be checked. (This requires a certain amount of prudence and understanding, otherwise this feature may be misused.)

    In this case, you must also set TSconfig excludeLinkTarget.storagePid to a page of type system folder. The editors must have access to this page (to be able to save records on this page).

  2. Setup page tsconfig

    It is recommended to set this in your site package and have it apply to the entire installation. Alternatively, set it in the page TSconfig of the start page of each site. See Page TSconfig on this page for a minimal setup or in TSconfig reference for a complete reference.

  3. Setup Global Configuration

    Look at the minimal global configuration below.

    The global configuration can be configured via the backend Settings > Configure Installation-Wide Options or in the file or typo3conf/LocalConfiguration.php.

  4. Setup Extension Configuration

    The section Extension configuration lists some basic settings.

  5. Check mail sending

    If an email should be sent on every link check performed via the console command, it is a good idea to check if email sending is setup correctly and works. (Sending a mail is optional).

    Go to Environment > Test Mail Setup

  6. Setup the console command brofix:checkLinks

    This will use the settings from the TSconfig configuration. If no start pages are supplied as arguments, all start pages that have a site configuration are used.

    You can run the console command from the command line (or cron).

    Do not execute link checking, just show what configuration is used:

    vendor/bin/typo3 brofix:checklinks --dry-run
    

    If everything is already configured, you don't need any arguments:

    vendor/bin/typo3 brofix:checklinks
    

    Execute link checking, send an email to webmaster@example.org:

    vendor/bin/typo3 brofix:checklinks --to webmaster@example.org
    
    # Use -h to show all parameters:
    vendor/bin/typo3 brofix:checklinks -h
    

    Or set it up via the scheduler: "Execute console commands > brofix:checklinks".

Minimal configuration

Global configuration

The global configuration affects not just brofix but the behaviour of other extensions as well.

If mod.brofix.mail.sendOnCheckLinks is 1, an email will be sent. You can override this in the console command. If an email should be sent, you should configure the recipient and sender address.

You can configure the following settings to set the from address globally (or you can set it specifically for brofix via TSconfig):

$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] = 'Webmaster';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] = 'webmaster@example.org';

This determines whether an html mail is sent, a text mail or both:

$GLOBALS['TYPO3_CONF_VARS']['MAIL']['format'] = 'both';

The template path is already added in this extension in ext_localconf.php, but only if the slot 901 is still free:

$GLOBALS['TYPO3_CONF_VARS']['MAIL']['templateRootPaths'][901]
   = 'EXT:brofix/Resources/Private/Templates/Email';
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['partialRootPaths'][901]
   = 'EXT:brofix/Resources/Private/Partials';

If not, you need to set this yourself, if a mail should be submitted when link checking is performed, using the default template in this extension.

Extension configuration

EXT:backend | loginLogo: Logo ...

Set the logo used in the Fluid email in the EXT:backend extension configuration:

$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['backend']['login.loginLogo'] = 'EXT:my_theme/Resources/Public/Images/login-logo.png or //domain.tld/login-logo.png';

EXT:brofix | traverseMaxNumberOfPagesInBackend: Maximum number of pages to traverse in Backend ...

Set the maximum number of pages traversed in the backend module. This should be limited so that loading the broken link list in the backend does not feel sluggish and slow. A good rule of thumb is to always keep the time required to load a page in the Backend always under 1 second. Depending on the performance of your site, you should use a limit such as 1000 (thousand).

$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['brofix']['traverseMaxNumberOfPagesInBackend'] = 1000;

Note

Remember that even though pagination is applied, Broken Link Fixer will always traverse through all subpages of the current page (unless the level is restricted in the form). The traversing of the pages is not cached and may cause considerable delays.

Page TSconfig

# email recipients
mod.brofix.mail.recipients = recipient@example.org

# Add contact information here, such as an email address or a URL which contains an email address
mod.brofix.linktypesConfig.external.headers.User-Agent =  Mozilla/5.0 (compatible; Site link checker; +https://gratesturff.com/imprint.html)

# pid of a page of type folder - this is where the exclude link target
# records are stored
mod.brofix.excludeLinkTarget.storagePid = 20

# you may want to exclude the domains of your own site from crawl delay
# this means no crawl delay will be used for these domains
# It is not recommended to do this for external domains
mod.brofix.crawlDelay.nodelay = example.org,example.com