Deprecate and remove algolia/places

Created on 26 June 2024, 2 months ago
Updated 28 August 2024, 10 days ago

Problem/Motivation

I'm not marking this as a bug, as webform isn't coming with a bug. But it links to the algolia/places library, which seems to be affected by that polyfill.io backdoor.

When going to their repository at https://github.com/algolia/places, this is archived and no issues can be reported any more. Their link to community.algolia.com/places/ isn't working either, it redirects to their commercial website.

This feels totally wrong to me. Not sure what webform wants to do about it. But leaving it as is feels bad.

Here is their note about sunsetting the places feature.

📌 Task
Status

Active

Version

6.2

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

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

Comments & Activities

  • Issue created by @jurgenhaas
  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Perhaps we should start by adding a warning, recommending that people uninstall it and announce that it will be removed in the future.

  • 🇺🇸United States jrockowitz Brooklyn, NY

    Let's add a warning.

    We could also create a webform_deprecated project namespace and gradually move deprecated webform modules into that namespace.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Some modules have in their info files package: 'Webform [DEPRECATED]'. Some, but not all, of these also have lifecycle: deprecated. It seems to me that if they have one, they should have the other.

  • 🇺🇸United States jrockowitz Brooklyn, NY

    Yes, we should add 'lifecycle: deprecated' to any module categorized as 'Webform [DEPRECATED]'

    • Liam Morland committed 31299c6a on 6.2.x
      Issue #3457229: Add `lifecycle: deprecated` to all modules in "Webform [...
    • Liam Morland committed 31299c6a on 6.x
      Issue #3457229: Add `lifecycle: deprecated` to all modules in "Webform [...
  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Done

  • 🇺🇸United States kruser

    if you use composer for the libraries install per https://www.drupal.org/docs/8/modules/webform/webform-frequently-asked-q... :

    "merge-plugin": {
    	"include": [
    		"modules/contrib/webform/composer.libraries.json"
    	]
    }
    

    It installs the algolia/places library regardless.

  • +1 to #10. Yes, this is what happens. Same with choices/choices, which is also affected.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
  • Hello,
    I wonder if there is a way to remove the dependency to algoglia/places in

    webform > composer.librarires.json

    and any other reference that points to algolia/places.

  • 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦

    Instead of including all of composer.librarires.json, you can add just the ones you actually use to your own composer.json.

  • thanks for your suggestion.

    I'm not sure if I understand you correctly.
    Here is the list of the required libraries by "Modules > contrib > webform" listed in the 'compose.librarires.json'

        "require": {
            "algolia/places": "*",
            "choices/choices": "*",
            "codemirror/codemirror": "*",
            "jquery/chosen": "*",
            "jquery/geocomplete": "*",
            "jquery/hotkeys": "*",
            "jquery/icheck": "*",
            "jquery/image-picker": "*",
            "jquery/inputmask": "*",
            "jquery/intl-tel-input": "*",
            "jquery/rateit": "*",
            "jquery/select2": "*",
            "jquery/textcounter": "*",
            "jquery/timepicker": "*",
            "jquery/toggles": "*",
            "popperjs/popperjs": "*",
            "progress-tracker/progress-tracker": "*",
            "signature_pad/signature_pad": "*",
            "svg-pan-zoom/svg-pan-zoom": "*",
            "tabby/tabby": "*",
            "tippyjs/tippyjs": "*"
        },
        "repositories": {
            "algolia.places": {
                "type": "package",
                "package": {
                    "name": "algolia/places",
                    "version": "1.19.0",
                    "type": "drupal-library",
                    "extra": {
                        "installer-name": "algolia.places"
                    },
                    "dist": {
                        "url": "https://registry.npmjs.org/places.js/-/places.js-1.19.0.tgz",
                        "type": "tar"
                    },
                    "license": "MIT"
                }
            },

    Those entries are part of the webform module.

    So, do I need to remove those entries -by applying a patch.

    Also, how can I know what libraries the 'webform' module needs, so I do not remove the ones that are actually needed by this module?

  • Oh,
    I think I got it.
    Just need to uninstall it either through the web interface (/admin/modules/uninstall) or command line
    Webform Algolia Places

  • @La558 You don't quite understand. In order to use those Webform sub-modules, you need to require the libraries. For example, in your composer.json:

    
        "require": {
            "wikimedia/composer-merge-plugin": "^2.0"
        },
        "extra": {
            "merge-plugin": {
                "include": [
                    "web/modules/contrib/webform/composer.libraries.json"
                ]
            },
    

    You would remove this, and explicitly require the libraries you need instead.

  • @solideogloria
    fantastic!
    Thank you for clarifying!

  • 🇩🇪Germany gngn

    Sorry, but I don't quite understand.
    Is there a replacement for algolia/places, i.e. can I use webform_location_places without using algolia/places?
    I'm not sure but briefly looking at the code it seems webform_location_places requires algolia/places.

    I'd like to keep using webform/composer.libraries.json (to easily get library update when updating webform) - so maybe we should offer a patch to webform/composer.libraries.json?
    Also a clean status page gives me a warm feeling.

    Or am I getting something wrong?

    Thanx for any explanations.

Production build 0.71.5 2024