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

Change entry or asset listener always push entry into queue #28

Open
sfsmfc opened this issue Jul 13, 2022 · 7 comments
Open

Change entry or asset listener always push entry into queue #28

sfsmfc opened this issue Jul 13, 2022 · 7 comments

Comments

@sfsmfc
Copy link
Contributor

sfsmfc commented Jul 13, 2022

The event listener for changing/add entries doesn't respect the blacklist settings for entries or assets. If I change/add an entry/asset, which should not be indexed according the blacklist settings, the plugin the index queue job to the queue.

Testet with plugin version 1.5.0 and Craft 3.7.48.

@nstCactus
Copy link
Member

Jobs are indeed added to the queue even for blacklisted entry types / asset volumes but the elements are NOT indexed.

The ElementIndexerService::indexElement() method is responsible for checking if elements should be indexed. This methods is called in several places of the plugin, including from the IndexElementJob class.

This is counter-intuitive and a little waste of resources, but we decided to do it that way to keep the code simpler.

@sfsmfc
Copy link
Contributor Author

sfsmfc commented Aug 24, 2022

@nstCactus Sorry, if I have to contradict, but the indexer tries to index these items and if the indexing not failed, the items will be indexed.

The question is, why the indexer doesn't stop here (https://github.com/la-haute-societe/craft-elasticsearch/blob/1.5.1/src/services/ElementIndexerService.php#L156). I will have a look and will open a new issue, if I found something.

@sfsmfc
Copy link
Contributor Author

sfsmfc commented Jun 13, 2023

@nstCactus Sorry for the late response. The problem is, that you test in src/services/ElementIndexerService.php#L155 only of type Entry for blacklist entries. The configuration for blacklisted asset volumes will be ignored. In PR #35, this "problem" will be fixed.

@sfsmfc
Copy link
Contributor Author

sfsmfc commented Aug 10, 2023

@nstCactus Can you please apply my patch for this issue? I cannot reopen this issue.

@nstCactus
Copy link
Member

Sorry @sfsmfc but we're currently quite busy and have no time to maintain this plugin. I'll try to schedule some time in September to review & merge your PR.

@nstCactus nstCactus reopened this Aug 11, 2023
@sfsmfc
Copy link
Contributor Author

sfsmfc commented Aug 7, 2024

@nstCactus Any news on this? The issue is still present.

@nstCactus
Copy link
Member

Hi Simon,

I'm no longer a maintainer of this plugin since I quit La Yaute Société.

@lhs-dev is the one you need to ask.

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

No branches or pull requests

2 participants