Ametys provides tools for managing broken links in content:
On each content item, you can open the broken links tool by clicking on the Broken links button in the Content tab.
The button icon provides information on the links in the selected content:
In this tool, all content links and images are listed. Each link (or image) has an icon representing its status:
In the example below, the Welcome to theAmetys demo site content links are listed.
All links are checked once a day, at a time chosen by the application administrator. As this is a lengthy process, and in order not to degrade performance, it is strongly recommended to choose a time in the middle of the night.
Each report is sent by e-mail to users who have the right to"Receive broken links report". Theemail is sent only if broken links have been detected.
Subject: [SITE] Broken links detected
Text body:
3 contents containing broken links were detected during the last check on [DATE] at [TIME]:
- Ut aliquam ornare cursus. : 1 broken link
- Clubs and organizations : 2 broken links
- Learn more about students : 1 broken link
To access the latest report, click on the link below or copy it into your browser's address bar: http: //cms.url.com/www/index.html?uitool=uitool-global-consistency
In Ametys, in the Home tab, click on Broken links report to see the latest report.
This opens a tool listing all content with a broken link.
Click on the content to see details of the links and to correct them.
The information displayed in the tool is that from the last report (automatic or manual). It may be necessary to refresh the results to obtain a new diagnostic updated with the latest modifications. To refresh the results of the global tool, you need to run a manual check (this is a resource-intensive process!).
You can launch a manual verification by clicking on the Launch verification button when the tool is open.
This check generates a new global report.
Depending on the number and size of the contents of your application, this operation can be time-consuming and resource-intensive. It's important to be aware of this problem before launching this process. It's best to make do with the data collected by the daily report generated overnight.
The analysis of broken links is performed by the server. If the server (the Java virtual machine running CMS Ametys ) has no access to the site, the link is considered broken.
Here are some classic causes:
- the network configuration prevents the server from accessing the page, even though the page is accessible from a workstation.
For example, a proxy is required, or the proxy must be disabled. At the JVM level, the following parameters can be configured
#Les valeurs sont a remplacer par les valeurs correspondantes JAVA_OPTS=$JAVA_OPTS" -Dhttp.proxyHost=monproxy.fr -Dhttp.proxyPort=3021 -Dhttp.nonProxyHosts=161.3.*.*"
or in "/etc/profile.d" add http_proxy.sh containing :
http_proxy=http://monproxy.fr:3021 export http_proxy
- the remote server is undergoing maintenance; usually, links are checked during the night, but some sites perform maintenance during the night and may be unavailable.
To test whether the server can access an address, simply connect via SSH and use a curl, lynx or wget command with theURL parameter.