Bug #76441

Update storage index (scheduler) and file mounts

Added by DMK E-BUSINESS GmbH over 4 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2016-06-03
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

If the CLI BE user has file mounts in a storage, the Update storage index (scheduler) task will only index files in the first file mount. This is because of the call $this->storage->getRootLevelFolder() in TYPO3\CMS\Core\Resource\Index\Indexer::processChangesInStorages()

Maybe the file mounts shouldn't be respected at that point but later when each file is checked. This way changed files would be detected in all file mounts.

I added the root folder (/) as a file mount as workaround.


Related issues

Related to TYPO3 Core - Bug #67148: Can only access first mount point Closed 2015-05-26

Associated revisions

Revision 3e5ddbbf (diff)
Added by Hannes Bochmann over 4 years ago

[BUGFIX] Index all file mounts in FAL indexer scheduler task

This patch makes sure all file mounts are indexed instead of only the
first if the CLI user has multiple file mounts.

Resolves: #76441
Releases: master, 7.6, 6.2
Change-Id: I92b1c11c46e6f2a7b5927d2f9013404681e0e8ad
Reviewed-on: https://review.typo3.org/48561
Tested-by: Bamboo TYPO3com <>
Reviewed-by: Stephan Großberndt <>
Reviewed-by: Georg Ringer <>
Tested-by: Georg Ringer <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

Revision 35178d80 (diff)
Added by Hannes Bochmann over 4 years ago

[BUGFIX] Index all file mounts in FAL indexer scheduler task

This patch makes sure all file mounts are indexed instead of only the
first if the CLI user has multiple file mounts.

Resolves: #76441
Releases: master, 7.6, 6.2
Change-Id: I92b1c11c46e6f2a7b5927d2f9013404681e0e8ad
Reviewed-on: https://review.typo3.org/48887
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

Revision b2c99152 (diff)
Added by Hannes Bochmann about 4 years ago

[BUGFIX] Index all file mounts in FAL indexer scheduler task

This patch makes sure all file mounts are indexed instead of only the
first if the CLI user has multiple file mounts.

Resolves: #76441
Releases: master, 7.6, 6.2
Change-Id: I92b1c11c46e6f2a7b5927d2f9013404681e0e8ad
Reviewed-on: https://review.typo3.org/48894
Reviewed-by: Stephan Großberndt <>
Tested-by: Stephan Großberndt <>
Reviewed-by: Frans Saris <>
Tested-by: Frans Saris <>

History

#1 Updated by DMK E-BUSINESS GmbH over 4 years ago

Is it a option to remove all file mounts of the CLI user or would this lead to having no read rights?

#2 Updated by DMK E-BUSINESS GmbH over 4 years ago

EDIT: I'm not completely sure but I think this was not always a problem. I believe in former versions all file mounts were indexed. (I don't know since when this is broken)

#3 Updated by Frans Saris over 4 years ago

  • Status changed from New to Accepted

Hi good catch.

IMO this part of typo3/sysext/core/Classes/Resource/Index/Indexer.php:

    /**
     * @return void
     */
    public function processChangesInStorages()
    {
        // get all file-identifiers from the storage
        $availableFiles = $this->storage->getFileIdentifiersInFolder($this->storage->getRootLevelFolder()->getIdentifier(), true, true);
        $this->detectChangedFilesInStorage($availableFiles);
        $this->processChangedAndNewFiles();

        $this->detectMissingFiles();
    }

needs to be changed to

    /**
     * @return void
     */
    public function processChangesInStorages()
    {
        // get all file-identifiers from the storage
        $availableFiles = $this->storage->getFileIdentifiersInFolder($this->storage->getRootLevelFolder(false)->getIdentifier(), true, true);
        $this->detectChangedFilesInStorage($availableFiles);
        $this->processChangedAndNewFiles();

        $this->detectMissingFiles();
    }

See the difference in the getRootLevelFolder() call

Could you push a patch for this to gerrit?

#4 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48560

#5 Updated by Stephan Großberndt over 4 years ago

I guess this happens on master too? This should be merged in master first then and be backported to 6.2 afterwards

#6 Updated by Gerrit Code Review over 4 years ago

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

#7 Updated by Gerrit Code Review over 4 years ago

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

#8 Updated by Gerrit Code Review over 4 years ago

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

#9 Updated by Gerrit Code Review over 4 years ago

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

#10 Updated by Gerrit Code Review over 4 years ago

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/48561

#11 Updated by Gerrit Code Review over 4 years ago

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

#12 Updated by Hannes Bochmann over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#13 Updated by Gerrit Code Review over 4 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48894

#14 Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/48894

#15 Updated by Hannes Bochmann over 4 years ago

  • Status changed from Under Review to Resolved

#16 Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF