-
Notifications
You must be signed in to change notification settings - Fork 179
Open
Description
Can't update/create image field in fixtures
protected function load(ContentFactory $factory): void
{
$content = $this->factory->create('image');
$content->setFieldValue('slug', 'icon');
$content->setFieldValue('image', 'image.png');
$this->factory->save($content);
}
Details
| Question | Answer |
|---|---|
| Relevant Bolt Version | 5.1.20 |
| Install type | composer |
| PHP version | 8 |
| Web server | Nginx |
| For UX/UI issues | Browser name and version |
Reproduction
- have a contentype
image:
name: Images
slug: image
singular_name: Image
searchable: false
viewless: true
fields:
slug:
type: slug
image:
type: image
- update/create record
$content = $this->factory->create('image');
$content->setFieldValue('slug', 'icon');
$content->setFieldValue('image', 'image.png');
$this->factory->save($content);
Bug summary
Problem is text fields are updated as expected, but not image field
Specifics
* Mention the URL where this bug occurs, if applicable
* What version of Bolt are you using (down to the very last digit!) 5.1.20
* What method did you use to install Bolt - composer
* What browser and version you are using - using cli
Expected result
Image gets updated
Actual result
text fields are updated, image field not
Metadata
Metadata
Assignees
Labels
No labels