Problem/Motivation
When using the site as a anonymous user I see the following error in the console:
"Uncaught ReferenceError: _ is not defined at Object.show (placeholder.js?v=1.x:29:9)"
Steps to reproduce
On a Drupal 10 site install FortyTwo and enable placeholder.js in the settings.
Use the site as a anonymous user and look at the console.
Proposed resolution
Include either the underscore library from Drupal or use Lodash.
Remaining tasks
- Write a patch
- Review the patch
- Release the patch
User interface changes
none
API changes
none
Data model changes
none
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3363774-underscore-is-not-defined-for-placeholder-js-3.patch | 708 bytes | arantxio |
| #2 | 3363774-underscore-is-not-defined-for-placeholder-js.patch | 708 bytes | arantxio |
Comments
Comment #2
arantxioHere is a patch that adds the required dependancies to the libraries, this solution will only work from Drupal 9.5 and higher
Comment #3
arantxioIt didn't update the info file in git so here is a updated patch.
Comment #4
batigolixComment #5
bram.velthoven commentedTested and patch works fine! setting to RTBC
Comment #7
batigolix