TypeError: round(): Argument #1 ($num) must be of type int|float, string given in round()

Created on 20 June 2024, over 1 year ago

While working with the Translation Management Tool → module on Drupal 10.2, I encountered the following error while reviewing translation:
TypeError: round(): Argument #1 ($num) must be of type int|float, string given in round() (line 114 of core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php).

šŸ› Bug report
Status

Active

Version

10.2 ✨

Component
FieldĀ  →

Last updated about 1 month ago

Created by

šŸ‡®šŸ‡³India manthan.chauhan

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

Comments & Activities

  • Issue created by @manthan.chauhan
  • Assigned to manthan.chauhan
  • šŸ‡®šŸ‡³India manthan.chauhan

    I have added patch to resolve the error.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • The Needs Review Queue Bot → tested this issue.

    While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)

  • First commit to issue fork.
  • Status changed to Postponed: needs info over 1 year ago
  • šŸ‡³šŸ‡æNew Zealand quietone

    Fixes are made on on 11.x (our main development branch) first, and are then back ported as needed according to our policies. Also, 10.2 is in security mode now.

    This needs steps to reproduce so we can confirm the result and write a test.

  • Status changed to Closed: outdated 8 months ago
  • šŸ‡ŗšŸ‡øUnited States smustgrave

    Since no follow up has been made in 6+ months going to close out as there isn't enough to test this on fresh core install. If still an issue please reopen updating the issue summary.

  • šŸ‡®šŸ‡³India Deepak Babu Sharma

    Hi Team,

    Could you please help me resolve this issue? I’m currently completely stuck due to this error. The main challenge is that I’m unable to identify the exact file name where the issue is originating, which is preventing me from making the necessary changes. kindly share your best solution for resolving it.
    Error : TypeError: range(): Argument #1 ($start) must be of type string|int|float, Drupal\file\Plugin\Field\FieldType\FileFieldItemList given in range() (line 235 of /app/vendor/twig/twig/src/Environment.php(421) : eval()'d code).

    Thanks,

Production build 0.71.5 2024