TypeError after updating to charts 3.3

Created on 12 November 2021, about 3 years ago
Updated 17 April 2024, 7 months ago

Problem/Motivation

Formatter breaks when updating to latest charts 8.x-3.3, I think due to the re-ordering of build variables.

TypeError: Argument 6 passed to Drupal\charts_highcharts\Plugin\chart\Highcharts::buildVariables() must be of the type array, string given, called in /var/www/html/docroot/modules/contrib/charts_field_formatter/charts_field_formatter.module on line 43

Steps to reproduce

Update to charts 8.x-3.3
Visit a previously working chart

Proposed resolution

Change the order of build variables to match

πŸ› Bug report
Status

Closed: outdated

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States NicholasS

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.

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    The patch in #5 adds unrelated coding standards and documentation fixes. The patch in the MR looks good but adds a whitespace error.

  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia
  • Status changed to Needs work about 1 year ago
  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    Since this breaks backwards compatibility with Charts 3.2 and below, we should declare version compatibility in composer and the module info file.

    We should probably create a new major 3.0.0 release or minor 2.1.0 release when this gets merged.

  • Status changed to Needs review about 1 year ago
  • πŸ‡§πŸ‡¬Bulgaria pfrenssen Sofia

    Updated the MR with my remarks. Since this now changes the module's info.yml, the patch from the MR will probably not apply against the packaged releases from Drupal.org since they append version info to the file. It's easy to work around this by requiring the dev branch:

        "require": {
            "cweagans/composer-patches": "^1.6.5",
            "drupal/charts_field_formatter": "2.0.x-dev"
        },
        "extra": {
            "patches": {
                "drupal/charts_field_formatter": {
                    "Patch for 3.3 compatibility https://www.drupal.org/project/charts_field_formatter/issues/3249136": "https://git.drupalcode.org/project/cha    rts_field_formatter/-/merge_requests/2.diff"
                }
            }
        }
    
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    Been running this patch for over 2 years, so I would say this has been reviewed.

  • πŸ‡ΊπŸ‡ΈUnited States NicholasS

    Adding a patch for d10

    {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                    "drupal/charts_field_formatter"
                ]
            },
    {
                "type": "vcs",
                "url": "https://git.drupalcode.org/issue/charts_field_formatter-3369229.git"
            },
    
    "drupal/charts": "^3.5",
            "drupal/charts_field_formatter": "dev-3369229-automated-drupal-10-charts-3.3",
    

    patches

    "drupal/charts_field_formatter": {
                    "Patch to allow any chart option to be overwritten": "https://git.drupalcode.org/project/charts_field_formatter/-/merge_requests/1.diff"
                },
    
  • πŸ‡ΊπŸ‡ΈUnited States NicholasS
  • Status changed to Closed: outdated 7 months ago
  • πŸ‡―πŸ‡΄Jordan omar alahmed Jordan
Production build 0.71.5 2024