Closed (fixed)
Project:
MyREST
Version:
1.0.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2026 at 06:30 UTC
Updated:
24 Sep 2026 at 07:55 UTC
Jump to comment: Most recent
MyrestImageBuilder::getStructureMediaImages() calls getSource() on every entity the field references. When the field references files — an image field under the same name, which is an ordinary way to model a picture — the response fatals with Call to undefined method ...File::getSource(). Its neighbour getStructureMediaImage() checks instanceof MediaInterface first and does not.
A module meant to work on the model a site actually has must not fatal because a site chose a file field where another chose media.
Everything.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
sergeydruua commentedComment #6
sergeydruua commented