Problem/Motivation

For Anonymous users that visits a page with fullPage.js this one doesn't work for known js error "Uncaught ReferenceError: Drupal is not defined". This error happens whenever there's a module that use, in its libraries, Drupal without requiring the core/drupal library dependency.

Steps to reproduce

  1. Enable fullPage.js for specific content type.
  2. Create a node of the type of content type just created.
  3. Visit the node using an anonymous session.
  4. Check the browser's console.

Proposed resolution

Add the - core/drupal dependency to the fullpagejs.libraries.yml file.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork fullpagejs-3170279

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

reinchek created an issue. See original summary.

reinchek’s picture

Title: Avoid "Uncaught ReferenceError: Drupal is not defined" for anonymouse user. » Avoid "Uncaught ReferenceError: Drupal is not defined" for anonymous users.
reinchek’s picture

Add the missing - core/drupal dependency.

  dependencies:
    - core/drupal
    - core/jquery
    - core/jquery.once
    - core/drupalSettings
reinchek’s picture

Status: Needs work » Needs review
reinchek’s picture

Status: Needs review » Reviewed & tested by the community

philipsoares made their first commit to this issue’s fork.

philipsoares’s picture

Version: 1.0.0-beta2 » 1.0.0-beta4
Status: Reviewed & tested by the community » Fixed

Fixed. Thanks @reinchek

philipsoares’s picture

Version: 1.0.0-beta4 » 1.0.0-beta2

Fixed on 1.0.0-beta4

philipsoares’s picture

Status: Fixed » Closed (fixed)
robertin0’s picture

thank you, it was really helpful for me