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.
Issue fork tiny_slider-3408349
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
Comment #2
brooke_heaton commentedComment #5
chetan 11 commentedHi,
I have successfully installed the above module on my local.
Please check the solution attached in MR.
Thanks.
Comment #6
brooke_heaton commentedThat 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
Comment #7
brooke_heaton commentedI added an isset check to all elemenets of the options array and this has resolved my issue.
Comment #8
brooke_heaton commentedComment #9
ipwa commentedComment #10
ipwa commentedThanks for fixing this :D
Comment #12
ipwa commentedComment #14
ipwa commentedAdding credit to @Belazoth who spotted a bug in this.
Comment #17
johnnydarkko commentedSorry 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?