Docs for ImageFieldCreationTrait and FileFieldCreationTrait are misleading

Created on 21 April 2023, about 1 year ago
Updated 10 November 2023, 7 months ago

Problem/Motivation

Docs for createImageField() say:

   * @param string $name
   *   The name of the new field (all lowercase), exclude the "field_" prefix.

That implies that the field_ prefix will be added for you.

This is not the case:

    FieldStorageConfig::create([
      'field_name' => $name,

Maybe what's meant is that you shouldn't bother with the field_ prefix?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
Documentation 

Last updated about 13 hours ago

No maintainer
Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024