LinkIntegrity
From TYPO3Wiki
Contents |
[edit] DRAFT to discuss about a Link Integrity
This page could be deleted after June 2006
[edit] The problem
In TYPO3 3.8 you can delete a page without having any idea if it is referenced elsewere on your site. In other words, your site will lost his Link integrity. It's still conceivable and acceptable that foreign/external links can't be checked on deletion tough...
[edit] What is the current situation ?
Links are inserted in content and hardcoded (simplified) as:
Look at my <LINK 17>Servers</LINK> !
When a page is called, the link is translated to usual HTML code (here I'm using simulatestatic):
Look at my <a href="17.html" target="page">Servers</a> !
If the page referenced (here PID #17) has been deleted, the FE will simply remove the link itself and just write what is inside the <a href>. In this exemple only the word Servers would appear without the usual HTML link for 'Servers'.
[edit] Problems
- We have lost a link and it's impossible to know.
- The new linkchecker (not yet official) by Sebastian Kurfuerst will permit to retrieve those lost link but it still needs manual validation by a BE user. See entry #1590 on the bugtracker.
- The integrity of the site is unsure
- It is up to our visitors to do our link validation since they are the only one that can see the problem.
[edit] A solution ?
Forget about TYPO3 internals for a second...
- Would it be important to have a link usage validation on deletion ?
- Would it be useful to add some kind of link abstraction layer ?
Continuing with the example: If PID #17 was not really the link to the ressource #17 but instead something in the middle do some translation/transformation (without the user even knowing) you would get:
<LINK 17>Servers</LINK> ---> pseudoTable(17 = PID 23) ---> PID 23 (real page)
Then on deletion of page PID23, the editor would had to review the page containing link to PID23 and make a decision (re-link to something else, delete sentence containing the link).
- At least, we need a mechanism to prevent internal pages of being deleted if referenced from inside our site.
Who really likes corruption or lack of data integrity ?
[edit] some questions/ideas
- ideal would be an m-to-1 relations table storing the following:
- IDs of the place where the link was inserted - will most likely consist of a table name and a UID
- the target of the link (internal, external, corresponding ID, options, ...)
- a _unique_ id identifying the target of the link.
- inside the link tag, the unique ID would be stored then, but for every editing process, this should be transparently converted into the link target
- if a page is deleted [or maybe as well set to hidden, don't know] - a warning should be issued showing all source pages where links link to the current page
- multiple options available then:
- remove links
- don't do anything
- new target UID
- conversion from the old system
- either through proposed update wizard
- or prefix the link in the link tag with r: for "relation" internally, then all new links would use the new system automatically
--kurfuerst 22:22, 10 Nov 2005 (CET)
- As far as I know the Links are created in the transformation process. We could add a hook there to notify the page owner or write to a table.
- REF: Transformations in TYPO3 Core APIs
Olivier Dobberkau
Actually, link integrity will be quite easy to check when 4.0 hits the street. There will be a global reference table summarizing all references in the system, *including* those that soft-reference parsers can pick up. I will use the same successfull engine that runs for import/export. Result: With 4.0 the solution to this problem will be much easier to see. Then a solution can be found for version 4.x.
- kasper
Initiator: Patrick Gaumond
