View mode can be nullable for some entities

Created on 29 March 2024, over 1 year ago

Problem/Motivation

In some cases entities doesn't have view mode, end we can get en error
TypeError: _eca_render_trigger_extra_field(): Argument #4 ($view_mode) must be of type string, null given, called in /var/www/html/web/modules/contrib/eca/modules/render/eca_render.module on line 299 in _eca_render_trigger_extra_field() (line 318 of modules/contrib/eca/modules/render/eca_render.module).

Proposed resolution

Need to change view_mode type param from string to null|string

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine r_cheh

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

Merge Requests

Comments & Activities

  • Issue created by @r_cheh
  • πŸ‡ΊπŸ‡¦Ukraine r_cheh

    for 2.x vesion

  • Status changed to Needs review over 1 year ago
  • Pipeline finished with Success
    over 1 year ago
    Total: 533s
    #132609
  • Status changed to Needs work over 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Thanks @r_cheh for reporting this. Is there a way on how this can be reproduced? AFAIKS that method _eca_render_trigger_extra_field is called from 2 places and none of them allows NULL for the display mode.

    Once we know, how this was happening what you reported above, we should find out the root of the problem. And if something really dispatches one of the hook where no display mode is present, then we should either define a default value (i.e. default or full) or follow the event that's being dispatched by that method, as that currently also expects a string and doesn't allow NULL.

    I hope you can follow-up with this?

  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Any news on this?

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen
  • Pipeline finished with Success
    about 1 year ago
    Total: 464s
    #197234
  • Status changed to Fixed 12 months ago
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Marking as fixed due to missing feedback.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    9 months ago
    Total: 667s
    #347011
  • Pipeline finished with Failed
    4 months ago
    Total: 615s
    #493268
  • Pipeline finished with Failed
    4 months ago
    Total: 843s
    #493309
  • Pipeline finished with Success
    4 months ago
    Total: 581s
    #493356
  • Pipeline finished with Skipped
    3 months ago
    #499034
  • Pipeline finished with Failed
    17 days ago
    Total: 655s
    #567060
  • Pipeline finished with Success
    17 days ago
    Total: 909s
    #567108
  • Pipeline finished with Success
    17 days ago
    Total: 860s
    #567199
Production build 0.71.5 2024