kaliop-uk / ezmigrationbundle

This bundle makes it easy to handle eZPlatform / eZPublish5 content upgrades/migrations
GNU General Public License v2.0
53 stars 81 forks source link

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

Open SalvatorePollaci opened 4 years ago

SalvatorePollaci commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

gggeek commented 4 years ago

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

SalvatorePollaci commented 4 years ago

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 commented 4 years ago

@gggeek I think the error message is due to this PR: https://github.com/ezsystems/ezplatform-solr-search-engine/pull/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 commented 4 years ago

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 commented 4 years ago

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