Skip to content

origin_id in localized entries are causing error #75

@j3ll3yfi5h

Description

@j3ll3yfi5h

I was trying to import 8804 entries from a current page with php please eloquent:import-entries.

It stopped with:

Call to a member function id() on string

  at vendor/statamic/eloquent-driver/src/Entries/Entry.php:46
     42▕         }
     43▕
     44▕         return $class::findOrNew($this->id())->fill([
     45▕             'id'         => $this->id(),
  ➜  46▕             'origin_id'  => $this->origin()?->id(),
     47▕             'site'       => $this->locale(),
     48▕             'slug'       => $this->slug(),
     49▕             'uri'        => $this->uri(),
     50▕             'date'       => $this->hasDate() ? $this->date() : null,

When I removed the translated data folders (with about 587 entries), it finishes without any problems. Any ideas?

Statamic 3.3.43 Pro
Laravel 8.83.25
PHP 8.0.16
statamic/collaboration 0.4.0
statamic/eloquent-driver 1.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions