You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The method getPageContent() in class /Classes/Indexer/Types/Page.php loads FileReferences and Links within a foreach loop into a variable $fileObjects.
If your Indexer configuration contains multiple RTE field, e.g:
The foreach loop will override the $fileObjects variable, thus only the links of last RTE field will be indexed.
// index content of this content element and find attached or linked files.
// Attached files are saved as file references, the RTE links directly to
// a file, thus we get file objects.
// Files go into the index no matter if "index_content_with_restrictions" is set
// or not, that means even if protected content elements do not go into the index,
// files do. Since each file gets its own index entry with correct access
// restrictions, that's no problem from an access permission perspective (in fact, it's a feature).
foreach ($contentFields as $field) {
$fileObjects = array_merge(
$this->findAttachedFiles($ttContentRow),
$this->findLinkedFilesInRte($ttContentRow, $field)
);
$content .= $this->getContentFromContentElement($ttContentRow, $field) . "\n";
}
// index the files found
if (!$pageAccessRestrictions['hidden']
&& $this->checkIfpageShouldBeIndexed($uid, $this->pageRecords[(int)$uid]['sys_language_uid'])
&& !empty($fileObjects)
) {
$this->indexFiles($fileObjects, $ttContentRow, $pageAccessRestrictions['fe_group'], $tags);
}
In this example configuration, when $this->indexFiles() is executed, the variable $fileObjects will be empty, even if the RTE field bodytext contains links.
The text was updated successfully, but these errors were encountered:
The method
getPageContent()
in class/Classes/Indexer/Types/Page.php
loads FileReferences and Links within aforeach
loop into a variable$fileObjects
.If your Indexer configuration contains multiple RTE field, e.g:
The foreach loop will override the
$fileObjects
variable, thus only the links of last RTE field will be indexed.In this example configuration, when
$this->indexFiles()
is executed, the variable$fileObjects
will be empty, even if the RTE fieldbodytext
contains links.The text was updated successfully, but these errors were encountered: