Support D10 and implement a subscriber for VendorStreamWrapperEvents::COLLECT_SAFE_LIST_REGEX_PATTERNS

Created on 21 September 2022, about 2 years ago
Updated 29 November 2023, 12 months ago

Problem/Motivation

Vendor Stream Wrapper 2.0.2 implements a VendorStreamWrapperEvents::COLLECT_SAFE_LIST_REGEX_PATTERNS event that allows modules to pass acceptable download patterns. Let's use that feature to allow the js and images of the picker.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

RTBC

Version

3.0

Component

Code

Created by

🇮🇹Italy mondrake 🇮🇹

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.

  • I am testing this module( jquery_colorpicker: 3x version ) on D10 setup and trying to make it D10 compatible, added required fields but facing issue in console due to which functionality is not working on D10..@mondrake can you please on this issue..

  • Status changed to RTBC over 1 year ago
  • 🇮🇳India abhinavk

    I have tested MR !7 in drupal 10.0.8 & drupal 9.5.7 and php 8.1. Everything is working fine for me and I have encountered no issues.

    Moving it to RTBC.

  • 🇨🇦Canada b_sharpe

    Just adding diff patch for composer from MR, no changes.

  • 🇮🇳India ashetkar

    Removed vendor stream wrapper dependency for jquery color picker module. Keep getting this issue in all sites.
    Uncaught TypeError: trigger.ColorPicker is not a function. Adding patch will remove dependency of vendor_stream_wrapper module.

  • 🇺🇦Ukraine olegrymar

    Updated #10 patch to be able to support Drupal 10.0.10.

  • 🇵🇱Poland nsavitsky

    Okay, I guess I will ease the pain for someone like me who needs to update old project with existing content made by Color API/JQuery Colorpicker fields to Drupal 10. Here is how to make it works using composer.

    First, until this issue is merged, you need to say composer that you want to use code from merge request as the source. Modify repositories section in composer.json like this.

        "repositories": [
            {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                    "drupal/jquery_colorpicker"
                ]
            },
            {
                "type": "composer",
                "url": "https://asset-packagist.org"
            },
            {
                "type": "package",
                "package": {
                    "name": "drupal/jquery_colorpicker",
                    "version": "dev-3310798-implement-a-subscriber",
                    "type": "drupal-module",
                    "source": {
                        "url": "https://git.drupalcode.org/issue/jquery_colorpicker-3310798.git",
                        "type": "git",
                        "reference": "3310798-implement-a-subscriber"
                    }
                }
            }
        ]
    

    Now, run "composer require drupal/jquery_colorpicker:dev-3310798-implement-a-subscriber". Composer will install the module using the source code from merge request #7.

    Next, you need to add JQuery Colorpicker vendor library. For some reason it was not installed in my case on previous step. Run "composer require jaypan/jquery-colorpicker:~1.0.1".

    Almost there. Last step is to apply patch from https://www.drupal.org/project/vendor_stream_wrapper/issues/3325235 which helps Vendor Stream Library to handle relative URLs from CSS.

                "drupal/vendor_stream_wrapper": {
                    "https://www.drupal.org/i/3325235": "https://git.drupalcode.org/project/vendor_stream_wrapper/-/merge_requests/6/diffs.patch"
                }
    

    And ta-da! Tested on Drupal 10.1.5 and PHP 8.1.

Production build 0.71.5 2024