Skip to content

IBX-11971: Fixed keyword field criterion from matching against archived versions#765

Open
Sztig wants to merge 2 commits into
4.6from
IBX-11971-ezkeyword-legacy-search-fix
Open

IBX-11971: Fixed keyword field criterion from matching against archived versions#765
Sztig wants to merge 2 commits into
4.6from
IBX-11971-ezkeyword-legacy-search-fix

Conversation

@Sztig

@Sztig Sztig commented Jun 23, 2026

Copy link
Copy Markdown
Contributor
🎫 Issue IBX-11971

Description:

As title says, I have added additional check on version so we are not searching on the content that might have be archived.

For QA:

Documentation:

@Sztig Sztig requested a review from a team June 23, 2026 12:42

@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.

Integration test is mandatory to show the behavior change.

'ezkeyword_attribute_link',
'kwd_lnk',
'f_def.id = kwd_lnk.objectattribute_id'
'f_def.id = kwd_lnk.objectattribute_id AND kwd_lnk.version = f_def.version'

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.

Is f_def an alias for ezcontentobject_attribute or ezcontentclass_attribute.version? I see I made this painful for myself by choosing the same alias for both tables across the system ;)

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.

It's an alias for ezcontentobject_attribute

$matcher = new HostElement(2);
// Set request and invoke match to initialize HostElement::$hostElements
$matcher->setRequest(SimplifiedRequest::fromUrl('http://ibexa.dev/foo/bar'));
// @phpstan-ignore method.resultUnused

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.

Fixed this and others unrelated via #767

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.

I will rebase once merged

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.

@Sztig read for a rebase :) and conflict resolution 😅

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.

Please test this in ./tests/integration using RepositoryTestCase as a base. These are legacy tests that are running on SQLite only, skipping MySQL and PostgreSQL.

For the described use case it should be straightforward to write a series of API calls that lead to wrong results.

@Sztig Sztig force-pushed the IBX-11971-ezkeyword-legacy-search-fix branch from faf019e to e40d0c6 Compare June 25, 2026 10:32
@sonarqubecloud

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants