Skip to content

IBX-11848: Fixed filtering by content types in ibexa:reindex command#760

Open
vidarl wants to merge 4 commits into
4.6from
IBX-11848_reindex_by_content-type_will_only_index_content_available_for_anonymous
Open

IBX-11848: Fixed filtering by content types in ibexa:reindex command#760
vidarl wants to merge 4 commits into
4.6from
IBX-11848_reindex_by_content-type_will_only_index_content_available_for_anonymous

Conversation

@vidarl

@vidarl vidarl commented Jun 5, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11848

Description:

The --content-type parameter for ibexa:reindex will execute a filter search (ContentService::find()), and this only returns content that is available to current user ( script is running as anonymous )

For QA:

Instructions on how to reproduce is provided in ticket description

Documentation:

@alongosz alongosz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vidarl looks like CI failure is relevant to the changes, at least when it comes to Solr integration tests.

@vidarl vidarl force-pushed the IBX-11848_reindex_by_content-type_will_only_index_content_available_for_anonymous branch from 34ed618 to ab30bb7 Compare June 19, 2026 12:53
*/
protected function supportsLikeWildcard($value)
{
parent::supportsLikeWildcard($value);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In 7129d21, parent::supportsLikeWildcard() read:

    protected function supportsLikeWildcard($value)
    {
        if ($this->getSetupFactory() instanceof LegacyElasticsearch) {
            $this->markTestSkipped('Elasticsearch Search Engine does not support Field Criterion LIKE');
        }

        return !is_numeric($value) && !is_bool($value);
    }

However, now it only returns the return. Thus it should be safe to remove the call to parent::supportsLikeWildcard()

@sonarqubecloud

Copy link
Copy Markdown

@vidarl

vidarl commented Jun 19, 2026

Copy link
Copy Markdown
Contributor Author

@vidarl looks like CI failure is relevant to the changes, at least when it comes to Solr integration tests.

@alongosz : Fixed that now, and also non-releated PHPStan complains

@vidarl vidarl requested a review from alongosz June 19, 2026 13:53
@alongosz alongosz changed the title IBX-11848: ibexa:reindex --content-type will only index content available for anonymous IBX-11848: Fixed filtering by content types in ibexa:reindex command Jun 19, 2026

return $this->contentService->find($filter);
/** @var \Ibexa\Contracts\Core\Repository\Values\Content\ContentList $contentList */
$contentList = $this->repository->sudo(function () use ($filter) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strict type is missing in a closure

@konradoboza konradoboza left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from Bartek's comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants