Closed andrasvati closed 1 year ago
There have been a number of updates to both these imports in the most recent version (2.1.0). Can you update to that?
It requires "statamic/cms": "^4.0.0" as i see, so i can't do it right now without upgrading statamic itself.
Then unfortunately it would be a case of backporting the bits of code you want need to your previous version. the imports do work in more recent versions (there is a bug on the entries import which theres an open PR to fix).
I've upgraded to statamic 4.0 (4.7.0) and eloquent-driver 2.0 (2.1.0) and the same problem exists. Adding the above lines fixes this, altough when having trees, i've got to run the imports in following order to import them too: php please eloquent:import-collections php please eloquent:import-entries php please eloquent:import-collections
(at first the trees aren't imported)
Thanks for this - I've opened a PR with the code changes required: https://github.com/statamic/eloquent-driver/pull/174
You could get around it by setting your repository to 'file' before importing, but I understand that might not have been obvious.
In terms of the tree import - did nothing import at all? I cant replicate that one on my local install. I would be intending to split the 'tree' import out on its own once we merge https://github.com/statamic/eloquent-driver/pull/133, as at that point the config and data will be seperate.
When trying to import collections or imports with php please eloquent:import-entries php please eloquent:import-collections no records are imported
It seems like it is looking for items in the database instead of the stache repository.
When i extend the function useDefaultRepositories() in ImportEntries command with \Illuminate\Support\Facades\Facade::clearResolvedInstance(EntryRepositoryContract::class); \Illuminate\Support\Facades\Facade::clearResolvedInstance(CollectionRepositoryContract::class);
and in ImportCollections with \Illuminate\Support\Facades\Facade::clearResolvedInstance(CollectionRepositoryContract::class); \Illuminate\Support\Facades\Facade::clearResolvedInstance(CollectionTreeRepositoryContract::class);
it begins working.
What could be wrong? I'm using "statamic/cms": "^3.4", (3.4.11) "statamic/eloquent-driver": "^1.2" (1.2.0)