Bug #79802

phash not unique

Added by Lukas Schmidt almost 3 years ago. Updated 3 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Indexed Search
Target version:
-
Start date:
2017-02-14
Due date:
% Done:

0%

TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

There is a page in my TYPO3 installation that is not part of the configured search section but nevertheless displayed in the result list.

This seems to be caused by a duplicate value for the phash column within the table index_section. The same phash is used for two very different pages. Isn't the phash value supposed to be unique?


Related issues

Related to TYPO3 Core - Bug #84541: Uncaught TYPO3 Exception in indexed_search: duplicate key (hash) error New 2018-03-27

History

#1 Updated by Sybille Peters over 1 year ago

  • Related to Bug #84541: Uncaught TYPO3 Exception in indexed_search: duplicate key (hash) error added

#2 Updated by Sybille Peters over 1 year ago

Thank you for your report.

There is another issue #84541 regarding hash calculation. This may be related. I am already working on a patch. However, the patch currently does not solve your issue, but I will look at it and try to consider this as well.

If you could add some steps to reproduce, it would be very helpful. But if you don't have them easily available, do not put too much effort in it. It is not strictly necessary, just helpful for the people testing.

#3 Updated by Sybille Peters over 1 year ago

About your question: " Isn't the phash value supposed to be unique?"

see ext_tables.sql:

CREATE TABLE index_section (
...
phash int(11) DEFAULT '0' NOT NULL,

*Classes/Indexer.php: *
..

$hash['phash'] = IndexedSearchUtility::md5inthash(serialize($hArray));

Classes/Utility/IndexedSearchUtility.php

 public static function md5inthash($stringToHash)
    {
        return hexdec(substr(md5($stringToHash), 0, 7));
    }

I came to the conclusion that md5inthash is the culprit because it cuts off parts of the md5 hash which causes collisions in the hashing mechanism.

#4 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#5 Updated by Gerrit Code Review about 1 year ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#6 Updated by Gerrit Code Review about 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#7 Updated by Gerrit Code Review about 1 year ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#8 Updated by Gerrit Code Review about 1 year ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#9 Updated by Gerrit Code Review about 1 year ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#10 Updated by Gerrit Code Review about 1 year ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#11 Updated by Gerrit Code Review about 1 year ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#12 Updated by Gerrit Code Review about 1 year ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#13 Updated by Gerrit Code Review about 1 year ago

Patch set 14 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#14 Updated by Gerrit Code Review about 1 year ago

Patch set 15 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#15 Updated by Gerrit Code Review about 1 year ago

Patch set 16 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58717

#16 Updated by Gerrit Code Review 11 months ago

Patch set 17 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/58717

#17 Updated by Gerrit Code Review 11 months ago

Patch set 18 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/58717

#18 Updated by Sybille Peters 3 months ago

  • Status changed from Under Review to New

#19 Updated by Sybille Peters 3 months ago

patch was abandoned.

Also available in: Atom PDF