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

Images cause error when repeatedly running populate task. #45

Open
davejtoews opened this issue Sep 19, 2022 · 0 comments · May be fixed by #46
Open

Images cause error when repeatedly running populate task. #45

davejtoews opened this issue Sep 19, 2022 · 0 comments · May be fixed by #46

Comments

@davejtoews
Copy link

Version 2.1.0

Relevant portion of my yml

SilverStripe\Assets\Image:
  imageOne:
    Created: "1970-01-02 03:04:05"
    Filename: assets/TestContent/imageBlockOne.jpg
    PopulateFileFrom: app/fixtures/assets/546-900x600.jpg
    PopulateMergeMatch:
      - Created

App\Elements\ImageElement:
  imageBlockOne:
    Title: Image Element
    ShowTitle: true
    Created: "1970-01-02 03:04:05"
    ImageID: =>SilverStripe\Assets\Image.imageOne
    ParentID: =>DNADesign\Elemental\Models\ElementalArea.imageArea
    PopulateMergeMatch:
      - Created

This runs fine the first time, but on the second pass creating the image results in the following:

[Notice] Trying to get property 'ID' of non-object
Line 72 in /var/www/html/vendor/dnadesign/silverstripe-populate/code/PopulateFactory.php

And then attempting to reference the image results in:

[Emergency] Uncaught InvalidArgumentException: No fixture definitions found for "=>SilverStripe\Assets\Image.imageOne"
Line 332 in /var/www/html/vendor/silverstripe/framework/src/Dev/FixtureBlueprint.php

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

Successfully merging a pull request may close this issue.

1 participant