- Merge request !36Issue # 3554464: Added a forked danrod96-new/flatpickr library for the flatpickrJS plugin → (Merged) created by danrod
I'm getting these errors when using the flatpickrJs plugin:
article:1 Refused to apply style from 'https://drupal.11.2.2.ddev.site/libraries/flatpickr/dist/flatpickr.css?t4r4f8' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
article:2497
GET https://drupal.11.2.2.ddev.site/libraries/flatpickr/dist/flatpickr.js?v=11.2.2 net::ERR_ABORTED 404 (Not Found)
[Violation] Forced reflow while executing JavaScript took 38ms
article:1 Refused to execute script from 'https://drupal.11.2.2.ddev.site/libraries/flatpickr/dist/flatpickr.js?v=11.2.2' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
drupal.js?v=11.2.2:64 Uncaught TypeError: $(...).flatpickr is not a function
at Object.attach (flatpickr.js?v=11.2.2:26:72)
at drupal.js?v=11.2.2:166:24
at Array.forEach (<anonymous>)
at Drupal.attachBehaviors (drupal.js?v=11.2.2:162:34)
at HTMLUListElement.<anonymous> (ajax.js?v=11.2.2:1404:18)
at T.each (jquery.min.js?v=4.0.0-beta.2:2:2876)
at T.fn.init.each (jquery.min.js?v=4.0.0-beta.2:2:1386)
at Drupal.AjaxCommands.insert (ajax.js?v=11.2.2:1396:19)
at ajax.js?v=11.2.2:1048:41
drupal.js?v=11.2.2:64 Uncaught TypeError: $(...).flatpickr is not a function
at Object.attach (flatpickr.js?v=11.2.2:26:72)
at drupal.js?v=11.2.2:166:24
at Array.forEach (<anonymous>)
at Drupal.attachBehaviors (drupal.js?v=11.2.2:162:34)
at HTMLAnchorElement.<anonymous> (ajax.js?v=11.2.2:1404:18)
at T.each (jquery.min.js?v=4.0.0-beta.2:2:2876)
at T.fn.init.each (jquery.min.js?v=4.0.0-beta.2:2:1386)
at Drupal.AjaxCommands.insert (ajax.js?v=11.2.2:1396:19)
at ajax.js?v=11.2.2:1048:41
drupal.js?v=11.2.2:64 Uncaught TypeError: $(...).flatpickr is not a function
at Object.attach (flatpickr.js?v=11.2.2:26:72)
at drupal.js?v=11.2.2:166:24
at Array.forEach (<anonymous>)
at Drupal.attachBehaviors (drupal.js?v=11.2.2:162:34)
at drupal.init.js?v=11.2.2:32:12
at HTMLDocument.listener (drupal.init.js?v=11.2.2:20:7)
drupal.js?v=11.2.2:64 Uncaught TypeError: $(...).flatpickr is not a function
at Object.attach (flatpickr.js?v=11.2.2:26:72)
at drupal.js?v=11.2.2:166:24
at Array.forEach (<anonymous>)
at Drupal.attachBehaviors (drupal.js?v=11.2.2:162:34)
at HTMLAnchorElement.<anonymous> (ajax.js?v=11.2.2:1404:18)
at T.each (jquery.min.js?v=4.0.0-beta.2:2:2876)
at T.fn.init.each (jquery.min.js?v=4.0.0-beta.2:2:1386)
at Drupal.AjaxCommands.insert (ajax.js?v=11.2.2:1396:19)
at ajax.js?v=11.2.2:1048:41
attach @ flatpickr.js?v=11.2.2:26
(anonymous) @ drupal.js?v=11.2.2:166
Drupal.attachBehaviors @ drupal.js?v=11.2.2:162
(anonymous) @ ajax.js?v=11.2.2:1404
each @ jquery.min.js?v=4.0.0-beta.2:2
each @ jquery.min.js?v=4.0.0-beta.2:2
insert @ ajax.js?v=11.2.2:1396
(anonymous) @ ajax.js?v=11.2.2:1048
Promise.then
(anonymous) @ ajax.js?v=11.2.2:1041
Drupal.Ajax.commandExecutionQueue @ ajax.js?v=11.2.2:1038
Drupal.Ajax.success @ ajax.js?v=11.2.2:1097
processReplacement @ big_pipe.js?v=11.2.2:84
checkMutationAndProcess @ big_pipe.js?v=11.2.2:109
(anonymous) @ big_pipe.js?v=11.2.2:133
processMutations @ big_pipe.js?v=11.2.2:132
Enable the module and use the flatpickrJS
It seems like there is an issue with the library definition:
"flatpickr-library": {
"type": "package",
"package": {
"name": "flatpickr/flatpickr",
"version": "4.6.13",
"type": "drupal-library",
"extra": {
"installer-name": "flatpickr"
},
"dist": {
"url": "https://github.com/flatpickr/flatpickr/archive/refs/tags/v4.6.13.zip",
"type": "zip"
}
}
}
The release https://github.com/flatpickr/flatpickr/archive/refs/tags/v4.6.13.zip used to have the dist directory, which has all the javascript and css files in order for the library to work, it doesn't seem the case anymore, and we might fork the project to include the missing dist library.
N/A
N/A
N/A
N/A
Active
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.