Problem/Motivation

Install galleryslider

Steps to reproduce

in node edit or node create
we get js error

VM2396:1 Uncaught SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at first.js?rhbgku:5:16
    at dispatch (galleryslider.js?rhbgku:5378:16)
    at elemData.handle (galleryslider.js?rhbgku:5031:35)

i find file first.js is not good catch error
it must be

$(window).load(function () {
  'use strict';
  let a = $('.slider').attr('data-settings');
  if(a){
    let b = JSON.parse(a);
    if(b){
      $('.slider').gridSlide(b);
    }
  }
});

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

lazzyvn created an issue. See original summary.

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

immaculatexavier’s picture

Status: Active » Needs review

Committed in accordance to the proposed resolution

haris khan jadoon changed the visibility of the branch 3306455-js-issue to hidden.

ishfaqafridi85’s picture

I’ll review the existing issue and test the reported error locally. I’ll check pages without a gallery and confirm that normal slider initialization still works, then share the results here.

riazsaid15’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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