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

  1. Write a patch
  2. Review the patch
  3. Release the patch

User interface changes

none

API changes

none

Data model changes

none

Comments

Arantxio created an issue. See original summary.

arantxio’s picture

Status: Active » Needs review
StatusFileSize
new708 bytes

Here is a patch that adds the required dependancies to the libraries, this solution will only work from Drupal 9.5 and higher

arantxio’s picture

It didn't update the info file in git so here is a updated patch.

batigolix’s picture

Issue tags: +finalist-sprint
bram.velthoven’s picture

Status: Needs review » Reviewed & tested by the community

Tested and patch works fine! setting to RTBC

  • Arantxio authored a59d14be on 8.x-4.x
    Issue #3363774 by Arantxio, bram.velthoven: ReferenceError: _ is not...
batigolix’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.