{"action":"closed","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/17008","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/17008/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/17008/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/17008/events","html_url":"https://github.com/magento/magento2/issues/17008","id":343454926,"node_id":"MDU6SXNzdWUzNDM0NTQ5MjY=","number":17008,"title":"Core Colorpicker JS doesn't work with RequireJS","user":{"login":"PivitParkour94","id":5085830,"node_id":"MDQ6VXNlcjUwODU4MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/5085830?v=4","gravatar_id":"","url":"https://api.github.com/users/PivitParkour94","html_url":"https://github.com/PivitParkour94","followers_url":"https://api.github.com/users/PivitParkour94/followers","following_url":"https://api.github.com/users/PivitParkour94/following{/other_user}","gists_url":"https://api.github.com/users/PivitParkour94/gists{/gist_id}","starred_url":"https://api.github.com/users/PivitParkour94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PivitParkour94/subscriptions","organizations_url":"https://api.github.com/users/PivitParkour94/orgs","repos_url":"https://api.github.com/users/PivitParkour94/repos","events_url":"https://api.github.com/users/PivitParkour94/events{/privacy}","received_events_url":"https://api.github.com/users/PivitParkour94/received_events","type":"User","site_admin":false},"labels":[{"id":688811200,"node_id":"MDU6TGFiZWw2ODg4MTEyMDA=","url":"https://api.github.com/repos/magento/magento2/labels/G1%20Passed","name":"G1 Passed","color":"0e8a16","default":false},{"id":686420665,"node_id":"MDU6TGFiZWw2ODY0MjA2NjU=","url":"https://api.github.com/repos/magento/magento2/labels/G2%20Passed","name":"G2 Passed","color":"0e8a16","default":false},{"id":161563561,"node_id":"MDU6TGFiZWwxNjE1NjM1NjE=","url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205","default":false}],"state":"closed","locked":false,"assignee":{"login":"VladimirZaets","id":8035672,"node_id":"MDQ6VXNlcjgwMzU2NzI=","avatar_url":"https://avatars1.githubusercontent.com/u/8035672?v=4","gravatar_id":"","url":"https://api.github.com/users/VladimirZaets","html_url":"https://github.com/VladimirZaets","followers_url":"https://api.github.com/users/VladimirZaets/followers","following_url":"https://api.github.com/users/VladimirZaets/following{/other_user}","gists_url":"https://api.github.com/users/VladimirZaets/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirZaets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirZaets/subscriptions","organizations_url":"https://api.github.com/users/VladimirZaets/orgs","repos_url":"https://api.github.com/users/VladimirZaets/repos","events_url":"https://api.github.com/users/VladimirZaets/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirZaets/received_events","type":"User","site_admin":false},"assignees":[{"login":"VladimirZaets","id":8035672,"node_id":"MDQ6VXNlcjgwMzU2NzI=","avatar_url":"https://avatars1.githubusercontent.com/u/8035672?v=4","gravatar_id":"","url":"https://api.github.com/users/VladimirZaets","html_url":"https://github.com/VladimirZaets","followers_url":"https://api.github.com/users/VladimirZaets/followers","following_url":"https://api.github.com/users/VladimirZaets/following{/other_user}","gists_url":"https://api.github.com/users/VladimirZaets/gists{/gist_id}","starred_url":"https://api.github.com/users/VladimirZaets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VladimirZaets/subscriptions","organizations_url":"https://api.github.com/users/VladimirZaets/orgs","repos_url":"https://api.github.com/users/VladimirZaets/repos","events_url":"https://api.github.com/users/VladimirZaets/events{/privacy}","received_events_url":"https://api.github.com/users/VladimirZaets/received_events","type":"User","site_admin":false},{"login":"engcom-backlog-nickolas","id":40755810,"node_id":"MDQ6VXNlcjQwNzU1ODEw","avatar_url":"https://avatars3.githubusercontent.com/u/40755810?v=4","gravatar_id":"","url":"https://api.github.com/users/engcom-backlog-nickolas","html_url":"https://github.com/engcom-backlog-nickolas","followers_url":"https://api.github.com/users/engcom-backlog-nickolas/followers","following_url":"https://api.github.com/users/engcom-backlog-nickolas/following{/other_user}","gists_url":"https://api.github.com/users/engcom-backlog-nickolas/gists{/gist_id}","starred_url":"https://api.github.com/users/engcom-backlog-nickolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/engcom-backlog-nickolas/subscriptions","organizations_url":"https://api.github.com/users/engcom-backlog-nickolas/orgs","repos_url":"https://api.github.com/users/engcom-backlog-nickolas/repos","events_url":"https://api.github.com/users/engcom-backlog-nickolas/events{/privacy}","received_events_url":"https://api.github.com/users/engcom-backlog-nickolas/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2018-07-23T00:47:50Z","updated_at":"2018-07-23T13:32:01Z","closed_at":"2018-07-23T13:32:01Z","author_association":"NONE","body":"<!---\r\n    Thank you for contributing to Magento.\r\n    To help us process this issue we recommend that you add the following information:\r\n     - Summary of the issue,\r\n     - Information on your environment,\r\n     - Steps to reproduce,\r\n     - Expected and actual results,\r\n\r\n    Please also have a look at our guidelines article before adding a new issue https://github.com/magento/magento2/wiki/Issue-reporting-guidelines\r\n-->\r\n\r\n### Preconditions\r\n<!---\r\n    Please provide as detailed information about your environment as possible.\r\n    For example Magento version, tag, HEAD, PHP & MySQL version, etc..\r\n-->\r\n1. Magento 2.2.x\r\n2. Mysql  Ver 15.1 Distrib 10.2.15-MariaDB, for Linux (x86_64) using readline 5.1\r\n3. PHP 7.0.30\r\n4. RequireJS 2.1.11\r\n\r\n\r\n### Steps to reproduce\r\n<!---\r\n    It is important to provide a set of clear steps to reproduce this bug.\r\n    If relevant please include code samples\r\n-->\r\n1. Create a javascript file that requires the colorpicker used in the core (under the product attribute Visual Swatch in the admin panel)\r\n````\r\n// Vendor_Module/js/this/custom/file\r\nrequire([\r\n    'jquery',\r\n    'jquery/colorpicker/js/colorpicker',\r\n], function ($) {\r\n    'use strict';\r\n    // do anything, the damage is done\r\n    console.log(\"required the colorpicker. Be free!\");\r\n````\r\n\r\n### Expected result\r\n<!--- Tell us what should happen -->\r\n1. Should see a message in the console that says \"required the colorpicker. Be free!\"\r\n2. Can then customise the colorpicker as you would please.\r\n\r\n### Actual result\r\n<!--- Tell us what happens instead -->\r\n1. Console error \"Uncaught Error: Mismatched anonymous define() module\" talking about the colorpicker.\r\n\r\nTo solve it, simply add any random string ID to the definition of the colorpicker.\r\nExample\r\n````\r\n// lib/web/jquery/colorpicker/js/colorpicker.js:10\r\ndefine(\"mage/colorpicker\", [\r\n\t\"jquery\",\r\n], function ($) {\r\n\r\n````\r\n\r\nA quick workaround is to simply repackage the colorpicker into the module/theme you want to use, with it patched as described, but it would be awesome to have this patched in the core, with the correct naming convention etc.\r\n\r\nPlease let me know if any more details are required."}}
{"actor":{"display_login":"engcom-backlog-nickolas"}}