Error: Class "\Mailchimp\Mailchimp" not found in Drupal\mailchimp\ClientFactory->createInstance() (line 161 of modules/contrib/mailchimp/src/ClientFactory.php).

Created on 9 September 2024, 2 months ago
Updated 20 September 2024, 2 months ago

I have updated drupal to 10.3.3 and updated you module, cleared the call, make sur that the composer is update, added the composer require 'drupal/mailchimp:^2.2' -W

but even with everything, I have this error:
Error: Class "\Mailchimp\Mailchimp" not found in Drupal\mailchimp\ClientFactory->createInstance() (line 161 of modules/contrib/mailchimp/src/ClientFactory.php).

I also see that :
Package mailchimp/mailchimp is abandoned, you should avoid using it. Use mailchimp/marketing instead.

So should you update the module?

🐛 Bug report
Status

Closed: won't fix

Version

2.0

Component

General

Created by

🇨🇭Switzerland sir_squall

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

Comments & Activities

  • Issue created by @sir_squall
  • 🇨🇭Switzerland sir_squall

    Any idea how to solve that?

  • 🇺🇸United States xenophyle

    Do you have a folder vendor/thinkshout/mailchimp-api-php? This should be downloaded when you run composer require drupal/mailchimp:^2.2 or composer install any point after that.

    Have you verified that the latest version of the mailchimp module has been downloaded to your installation?

    When and where are you seeing the notice about package mailchimp/mailchimp? That should not be needed at all.

  • Status changed to Postponed: needs info 2 months ago
  • 🇨🇭Switzerland sir_squall

    Yes I have this modul installed:
    composer require drupal/mailchimp:^2.2
    ./composer.json has been updated
    Running composer update drupal/mailchimp
    Loading composer repositories with package information
    Updating dependencies
    Nothing to modify in lock file
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Nothing to install, update or remove
    Generating autoload files
    93 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    phpstan/extension-installer: Extensions installed
    Scaffolding files for drupal/core:

    And in the vendor directory:
    ls -l vendor/thinkshout/mailchimp-api-php/
    total 24
    -rw-r--r-- 1 uid81104 gid81104 612 déc 8 2023 composer.json
    -rw-r--r-- 1 uid81104 gid81104 3150 déc 8 2023 CONTRIBUTING.md
    -rw-r--r-- 1 uid81104 gid81104 268 déc 8 2023 phpunit.xml
    -rw-r--r-- 1 uid81104 gid81104 3966 déc 8 2023 README.md
    drwxr-sr-x 3 uid81104 gid81104 4096 déc 8 2023 src
    drwxr-sr-x 3 uid81104 gid81104 4096 déc 8 2023 tests

    The module is there, but when I go to the "admin/config/services/mailchimp", I have this error:
    The website encountered an unexpected error. Try again later.

    Error: Class "\Mailchimp\Mailchimp" not found in Drupal\mailchimp\ClientFactory->createInstance() (line 161 of modules/contrib/mailchimp/src/ClientFactory.php).

    super strange

  • 🇨🇭Switzerland sir_squall

    this is my composer.json:

    {
        "name": "drupal/recommended-project",
        "description": "Project template for Drupal 9 projects with a relocated document root",
        "type": "project",
        "license": "GPL-2.0-or-later",
        "homepage": "https://www.drupal.org/project/drupal",
        "support": {
            "docs": "https://www.drupal.org/docs/user_guide/en/index.html",
            "chat": "https://www.drupal.org/node/314178"
        },
        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8"
            },
          {
            "type": "package",
            "package": {
              "name": "northernco/ckeditor5-anchor-drupal",
              "version": "0.2.0.",
              "type": "drupal-library",
              "dist": {
                "url": "https://registry.npmjs.org/@northernco/ckeditor5-anchor-drupal/-/ckeditor5-anchor-drupal-0.2.0.tgz",
                "type": "tar"
              }
            }
          }
        ],
      
        "require": {
            "composer/installers": "^1.9",
            "drupal/anchor_link": "^3.0@alpha",
            "drupal/antibot": "^2.0",
            "drupal/backup_migrate": "^5.0",
            "drupal/better_social_sharing_buttons": "^4.0",
            "drupal/ckeditor": "^1.0",
            "drupal/ckeditor5_findandreplace": "^1.1",
            "drupal/ckeditor5_plugin_pack": "^1.2",
            "drupal/ckeditor_find": "^2.0@beta",
            "drupal/ckeditor_font": "^2.0@beta",
            "drupal/content_entity_clone": "^1.0",
            "drupal/core-composer-scaffold": "^10",
            "drupal/core-project-message": "^10",
            "drupal/core-recommended": "^10",
            "drupal/datalayer": "^2.0@RC",
            "drupal/editor_advanced_link": "^2.2",
            "drupal/elasticsearch_connector": "^7.0@alpha",
            "drupal/elasticsearch_search_api": "^2.1",
            "drupal/entity": "^1.4",
            "drupal/entity_clone": "^2.0@beta",
            "drupal/entityqueue": "^1.6",
            "drupal/facets": "^3.0@beta",
            "drupal/facets_date_range": "^1.0@beta",
            "drupal/fakeobjects": "^1.2",
            "drupal/flexible_permissions": "^1.0",
            "drupal/image_widget_crop": "^2.4",
            "drupal/imce": "^3.0",
            "drupal/linkit": "^6.1",
            "drupal/ludwig": "^2.0",
            "drupal/mailchimp": "^2.2",
            "drupal/metatag": "^2.0",
            "drupal/migrate_plus": "^6.0",
            "drupal/migrate_tools": "^6.0",
            "drupal/migrate_upgrade": "^4",
            "drupal/paragraphs": "^1.15",
            "drupal/pathauto": "^1.11",
            "drupal/redirect": "^1.9",
            "drupal/scheduler": "^2.0",
            "drupal/search_api": "^1.29",
            "drupal/search_api_page": "^1.0",
            "drupal/search_api_sorts": "^1.1",
            "drupal/simple_sitemap": "^4.1",
            "drupal/twigsuggest": "^1.0@RC",
            "drupal/upgrade_status": "^4.0",
            "drupal/views_data_export": "^1.3",
            "drupal/views_migration": "^1.2",
            "drupal/webform": "^6.2",
            "northernco/ckeditor5-anchor-drupal": "^0.2.0",
            "thinkshout/mailchimp-api-php": "v3.0.1"
        },
        "conflict": {
            "drupal/drupal": "*"
        },
        "minimum-stability": "dev",
        "prefer-stable": true,
        "config": {
            "allow-plugins": {
                "composer/installers": true,
                "drupal/core-composer-scaffold": true,
                "drupal/core-project-message": true,
                "dealerdirect/phpcodesniffer-composer-installer": true,
                "phpstan/extension-installer": true,
                "php-http/discovery": true
            },
            "sort-packages": true
        },
        "extra": {
            "drupal-scaffold": {
                "locations": {
                    "web-root": "web/"
                }
            },
            "installer-paths": {
                "web/core": [
                    "type:drupal-core"
                ],
                "web/libraries/{$name}": [
                    "type:drupal-library"
                ],
                "web/modules/contrib/{$name}": [
                    "type:drupal-module"
                ],
                "web/profiles/contrib/{$name}": [
                    "type:drupal-profile"
                ],
                "web/themes/contrib/{$name}": [
                    "type:drupal-theme"
                ],
                "drush/Commands/contrib/{$name}": [
                    "type:drupal-drush"
                ],
                "web/modules/custom/{$name}": [
                    "type:drupal-custom-module"
                ],
                "web/profiles/custom/{$name}": [
                    "type:drupal-custom-profile"
                ],
                "web/themes/custom/{$name}": [
                    "type:drupal-custom-theme"
                ]
            },
            "drupal-core-project-message": {
                "include-keys": [
                    "homepage",
                    "support"
                ],
                "post-create-project-cmd-message": [
                    "<bg=blue;fg=white>                                                         </>",
                    "<bg=blue;fg=white>  Congratulations, you’ve installed the Drupal codebase  </>",
                    "<bg=blue;fg=white>  from the drupal/recommended-project template!          </>",
                    "<bg=blue;fg=white>                                                         </>",
                    "",
                    "<bg=yellow;fg=black>Next steps</>:",
                    "  * Install the site: https://www.drupal.org/docs/installing-drupal",
                    "  * Read the user guide: https://www.drupal.org/docs/user_guide/en/index.html",
                    "  * Get support: https://www.drupal.org/support",
                    "  * Get involved with the Drupal community:",
                    "      https://www.drupal.org/getting-involved",
                    "  * Remove the plugin that prints this message:",
                    "      composer remove drupal/core-project-message"
                ]
            }
        },
        "require-dev": {
            "drupal/core-dev": "^10"
        }
    }
    
  • 🇨🇭Switzerland sir_squall

    I have removed them and reinstall them, and still same error:
    composer require drupal/mailchimp
    ./composer.json has been updated
    Running composer update drupal/mailchimp
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 2 installs, 0 updates, 0 removals
    - Locking drupal/mailchimp (2.2.4)
    - Locking thinkshout/mailchimp-api-php (v3.0.1)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 2 installs, 0 updates, 0 removals
    - Downloading drupal/mailchimp (2.2.4)
    - Installing thinkshout/mailchimp-api-php (v3.0.1): Extracting archive
    - Installing drupal/mailchimp (2.2.4): Extracting archive
    Generating autoload files
    93 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    phpstan/extension-installer: Extensions installed
    Scaffolding files for drupal/core:

  • 🇨🇭Switzerland sir_squall

    Ok I had some progress here, I finnally make this working, the compser didn't wanted to the end because he didn''t had the permission to write on the default folder, so now the module is installed, but I have another error, I'm unable to login:

    I did the Oauth authentificaiton, and in mailchimp in integration I got the new ligne ast he app is integretated correctly, but I still have the message that the oauth is not setup:
    Unable to connect to Mailchimp API. Visit OAuth Settings page to authenticate or uncheck "Use OAuth Authentication" and add an api_key below (deprecated).



  • 🇨🇭Switzerland sir_squall

    Ok I used the api key (deprecated) and it's working well

  • Status changed to Closed: won't fix 2 months ago
Production build 0.71.5 2024