Add test coverage for file entity reference selection plugin

Created on 10 October 2014, over 10 years ago
Updated 27 January 2023, over 2 years ago

Problem/Motivation

Creating a node with a entity reference field refer to a file got an error (on js console):
Fatal error: Call to a member function range() on a non-object in /core/modules/entity_reference/src/Plugin/entity_reference/selection/SelectionBase.php on line 184

Steps To Reproduce

Create a content type "File", with a file field "File"

Add some contents to "File"

Add reference field "File Reference" to "Article", then set "Type of item to reference" to "File" ("File" entity type, not "Content" entity type with bundle "File")

Open javascript console, then add new "Article"

Expected: autocomple work, with a list of file including sample.jpg
Actual: autocomple does not work, with an error:

📌 Task
Status

Needs work

Version

10.1

Component
File module 

Last updated 1 day ago

Created by

🇻🇳Vietnam tien.xuan.vo

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇺🇸United States smustgrave

    Thinking I got tickets crossed in #28?

    But ran #27 for D10 tests and had CI failures.

  • First commit to issue fork.
  • Merge request !12264Refactor the existing functional test. → (Open) created by mohit_aghera
  • 🇮🇳India mohit_aghera Rajkot

    - Updated a new kernel test to validate the entity query results.
    - Using other general practices for creating fields etc.

    Code is already fixed so no changes are required in EntityReference handler plugin.
    Hiding existing patches in favour of MR.

    Tests are passing on local.

  • Pipeline finished with Failed
    2 days ago
    Total: 166s
    #509238
  • Pipeline finished with Failed
    2 days ago
    Total: 175s
    #509249
  • Pipeline finished with Failed
    2 days ago
    Total: 581s
    #509261
  • 🇺🇸United States smustgrave

    Thanks for working on this!

    Test failures seem related to this change.

  • Pipeline finished with Failed
    1 day ago
    Total: 496s
    #509985
Production build 0.71.5 2024