Project

General

Profile

Actions

Bug #13828

closed

checkhidden has no effect for some configurations

Added by Daniel Minder about 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Must have
Category:
Linkvalidator
Target version:
-
Start date:
2011-03-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I've set up a scheduler task to check the complete page tree. Therefore, the processor class is initialized with a list of page ids that contain all pages in the page tree.

Now, getLinkStatistics() checks the records of pages, tt_content and tt_news within this page id list (uid or pid). The checkhidden configuration setting removes the hidden pages when the page table is checked, but it does not remove the records (e.g. from tt_content) when the pages that contains them is hidden.

So, if you have to hidden pages A and B and A contains a link to B, linkvalidator will report an error 'Page B is not visible.'

It get's even more complicated with TemplaVoila. There, a page and tt_content record can be not deleted and not hidden, but simply not linked from TV and, therefore, not displayed. But linkvalidator will report an error if such records contain a non-working link.

Given the fact that TV is widely used and probably not many people clean up unused (i.e. unlinked from TV) records I suspect many false positives.


Files

13828.diff (10.9 KB) 13828.diff Michael Miousse, 2011-04-26 22:07
Actions #1

Updated by Philipp Gampe about 13 years ago

I think the code is just the wrong way around. It should first remove hidden pages and then get the uids of the content elements. Obviously hidden(=disabled) stuff should not be checked.

Actions #2

Updated by Daniel Minder about 13 years ago

Maybe, extGetTreeList() should already filter out hidden pages. Nevertheless, this solves only half of the problem. For TV, we have to parse the TV XML data to find out which tt_content records are actually used...

Actions #3

Updated by Philipp Gampe about 13 years ago

Daniel Minder wrote:

Nevertheless, this solves only half of the problem. For TV, we have to parse the TV XML data to find out which tt_content records are actually used...

TV is out of scope of TYPO3 core and core does not care about TV! Storing this data in XML is bad design and there is no reason to add TV complexity to core.

If you come up with an "easy" patch, this might go into linkvalidator, but the better solution would be to create an extension which adds a new method to check TV content.
You can then disable normal internal checking.

Maybe we need to further split link checking methods (pages, content elements, etc.), but this would be a different issue.

Actions #4

Updated by Daniel Minder about 13 years ago

Right, TV is not in core. But it was already discussed 5 years ago to move it there... But we have to admit that TV is widely used, regardless if storing page structure in XML is bad design or not.

I'm fine with putting the TV checking stuff to an extra extension, but linkvalidator has to provide hooks to make this possible.

Actions #5

Updated by Michael Miousse about 13 years ago

here is a patch to correct the bug
anyone to test it?

Actions #6

Updated by Michael Miousse about 13 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Michael Miousse
Actions #7

Updated by Michael Miousse almost 13 years ago

Still no feedback

anyone?

Actions #8

Updated by Philipp Gampe almost 13 years ago

I see if I can test tomorrow ... do you have a test extension? (You can try to nag me on Skype tomorrow ... this might help for faster reviews :D)

Actions #9

Updated by Philipp Gampe almost 13 years ago

Shouldn't we remove those commented lines?

Actions #10

Updated by Michael Miousse almost 13 years ago

Yes comented code is useless in my opinion

Actions #11

Updated by Daniel Minder almost 13 years ago

Validation for internal pages works now fine for the website where it failed before (the one from the report above). Checked it on a second installation that was fine before - and still is fine :) Thanks for the patch!

Actions #12

Updated by Philipp Gampe almost 13 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

Applied in changeset r47877.

Actions #13

Updated by Ernesto Baschny almost 13 years ago

The committed change seems to have opened a discussion in https://review.typo3.org/2288, where a reviewer points into this part of the code makes the statistic of broken links go mad (displaying "2" instead of "1").

So currently we cannot merge the "whole commit" and its sad because we wanted to include these fixes in 4.5.3 (to be released tomorrow morning). Anyone capable of solving that and resubmitting something working until tomorrow? :)

Thanks!

Actions #14

Updated by Ernesto Baschny almost 13 years ago

Please re-check https://review.typo3.org/2288 and patch set 4. I will send you a patch with the CGL fixes applied during this review, so that they can be applied to your external repository also (which we will migrate from SVN to GIT submodule afterwards).

Actions #15

Updated by Chris topher about 12 years ago

  • Status changed from Resolved to Closed
Actions #16

Updated by Michael Stucki over 10 years ago

  • Category set to Linkvalidator
Actions #17

Updated by Michael Stucki over 10 years ago

  • Project changed from 1510 to TYPO3 Core
  • Category changed from Linkvalidator to Linkvalidator
Actions

Also available in: Atom PDF