Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with workspaces. Contend in editing indexed #139

Closed
alexmari81 opened this issue Dec 15, 2022 · 4 comments
Closed

Problem with workspaces. Contend in editing indexed #139

alexmari81 opened this issue Dec 15, 2022 · 4 comments
Labels
question Further information is requested

Comments

@alexmari81
Copy link

I have typo3 11.5 I use ke_search 4.5.1.

I created a workspace for editing and there are content that are in "editing" status.

Result page of ke_search display contents that are not approved and aro not in live workspace, how can i resolve?

@christianbltr
Copy link
Member

I cannot reproduce this for pages and text content elements. And there is already a check implemented if content is not in the live stage.

What kind of content are you indexing? Is it some kind of extension records?

@christianbltr christianbltr added the question Further information is requested label Jan 6, 2023
@alexmari81
Copy link
Author

It is a "header" content

@alexmari81
Copy link
Author

alexmari81 commented Jan 10, 2023

Hi, i printed the query for tt_content (ke_search\Classes\Indexer\Types\Page.php) and i have:

SELECT uid, pid, header, CType, sys_language_uid, header_layout, fe_group, file_collections, filelink_sorting, records, bodytextFROMtt_content WHERE (pid = :dcValue1) AND (CType="text" OR CType="textmedia" OR CType="textpic" OR CType="bullets" OR CType="table" OR CType="html" OR CType="header" OR CType="uploads" OR CType="shortcut") AND ((tt_content.deleted = 0) AND (tt_content.hidden = 0) AND (tt_content.starttime <= 1673362080) AND ((tt_content.endtime = 0) OR (tt_content.endtime > 1673362080)))

there is no trace of versioning so i added this code to the query:

  ->andWhere(
                        $queryBuilder->expr()->eq('t3ver_state', $queryBuilder->createNamedParameter(0, \PDO::PARAM_INT)))

and it works as i expected.

I don't know why there isn't this restriction, maybe i missed something?

@christianbltr
Copy link
Member

My fault, the check was only implemented for pages, not for content elements.

The check is now implemented for content elements also. The patch is in version 4.6.1 which has just been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants