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

Unable to delete all contents of content types with ezplatform-solr-search-engine #227

Open
SalvatorePollaci opened this issue Oct 24, 2019 · 7 comments
Labels

Comments

@SalvatorePollaci
Copy link

SalvatorePollaci commented Oct 24, 2019

Hi I'm trying to delete all contents of a list of content types as so:

-
    type: content
    mode: delete
    match:
        content_type_identifier: [product, product_accessory]

But the migration fails with the following error message:

Migration failed! Reason: Error in execution of step 3: Intentionally not implemented: No visitor available for: eZ\Publish\API\Repository\Values\Content\Query\SortClause\LocationDepth in file /application/vendor/ezsystems/ezplatform-solr-search-engine/lib/Query/Common/SortClauseVisitor/Aggregate.php line 80

Is this a bug? Am I forgetting do to something?

Ps I'm using kaliop/ezmigrationbundle v5.10.1

@gggeek
Copy link
Member

gggeek commented Oct 24, 2019

Interesting.... I think I have seen something similar before but I don't remember the details.
Does it work if you use 2 separate steps for deleting the contents?

@SalvatorePollaci
Copy link
Author

I just tried using 2 separate steps for deleting the contents but I get the same exact error message.

@gggeek
Copy link
Member

gggeek commented Oct 25, 2019

OK, I will have a look if I manage to reproduce this. Which kernel version are you using ?

@SalvatorePollaci
Copy link
Author

SalvatorePollaci commented Oct 25, 2019

I'm not sure if this is the correct dependency you are asking for, but if I run a composer show -i, I see

ezsystems/ezpublish-kernel v5.4.14

@SalvatorePollaci
Copy link
Author

@gggeek I think the error message is due to this PR: ezsystems/ezplatform-solr-search-engine#14

Currently I'm using the following version of such bundle:

ezsystems/ezplatform-solr-search-engine v1.0.10 Solr search engine implementation for eZ Platform

@gggeek gggeek added the bug label Nov 8, 2019
@gggeek
Copy link
Member

gggeek commented Apr 18, 2020

You are correct in identifying the cause of the problem.
Besides matches based on content_type_identifier, there are other 2 functions which will break when using recent versions of ezplatform-solr-search-engine...
I'm looking into an acceptable solution that would keep maximum BC for all users not in that scenario.

@gggeek
Copy link
Member

gggeek commented Apr 18, 2020

ps: in the meantime, you should be able to work around your problem by adding a match_sort clause to your step definition

@gggeek gggeek changed the title Unable to delete all contents of content types Unable to delete all contents of content types with ezplatform-solr-search-engine Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants