Using version 1.1.x-dev, after installing on Drupal version 9.5.11, I am unable to configure a view due to a fatal PHP error that breaks AJAX after clicking 'Settings':

parsererror\nResponseText: Warning: Undefined array key "gutter" in /app/web/modules/contrib/tiny_slider/src/Plugin/views/style/TinySlider.php

also:

Warning: Undefined array key "mode" in /app/web/modules/contrib/tiny_slider/src/Plugin/views/style/TinySlider.php

It seems that the module assumes all settings should be set but obviously if you are just creating the view, they are not.

The above errors occur after selecting 'Tiny Slider' for the View Display and attempting to add Settings to the settings.

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

brooke_heaton created an issue. See original summary.

brooke_heaton’s picture

Issue summary: View changes

chetan 11 made their first commit to this issue’s fork.

chetan 11’s picture

Status: Active » Needs review

Hi,
I have successfully installed the above module on my local.
Please check the solution attached in MR.
Thanks.

brooke_heaton’s picture

Issue summary: View changes
Status: Needs review » Needs work

That fix seems to have worked, but now I'm getting the error below. This seems to be a problem with not having settings initially for all options across the board. All settings in the 'options' that are not set will throw this error on the initial setting of the View Display (e.g. speed, center, itemsMobile, dimensionDesktop). None of those will intially be set. This makes me wonder how this module would be usable for anyone out of the box.

Warning: Undefined array key "mode" in /app/web/modules/contrib/tiny_slider/src/Plugin/views/style/TinySlider.php

brooke_heaton’s picture

Assigned: Unassigned » brooke_heaton
Status: Needs work » Needs review

I added an isset check to all elemenets of the options array and this has resolved my issue.

brooke_heaton’s picture

Issue summary: View changes
ipwa’s picture

Status: Needs review » Reviewed & tested by the community
ipwa’s picture

Thanks for fixing this :D

  • ipwa committed f132ec67 on 1.1.x authored by chetan 11
    Issue #3408349 by brooke_heaton, chetan 11, ipwa: Undefined array key "...
ipwa’s picture

Status: Reviewed & tested by the community » Fixed

ipwa credited Belazoth.

ipwa’s picture

Adding credit to @Belazoth who spotted a bug in this.

  • ipwa committed 989c9d6d on 1.1.x
    Issue #3408349 by brooke_heaton, chetan 11, ipwa, Belazoth: Undefined...

Status: Fixed » Closed (fixed)

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

johnnydarkko’s picture

Sorry if this is the wrong thread to put this in, but while applying this patch to 1.1.0-rc3, the patch does not apply. This patch is based off of the 1.1.x branch, which has diverged from the latest release 1.1.0-rc3. Because of this, we will need to require rc1 or be on the 1.1.x branch. Will rc3 be merged back into the main 1.1.x branch?