Everytime I change something in the slideshow or refresh the cache, I get an error notification (in the red):

Notice: Undefined index: views_slideshow_pager_bullets in template_preprocess_views_slideshow_pager_bullets() (line 295 of modules/contrib/views_slideshow/views_slideshow.theme.inc).

It continues (in the white):

template_preprocess_views_slideshow_pager_bullets(Array, 'views_slideshow_pager_bullets', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_slideshow_pager_bullets', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 221)
template_preprocess_views_slideshow_pager_widget_render(Array, 'views_slideshow_pager_widget_render', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_slideshow_pager_widget_render', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 74) etc.

Seems to have to do with the new bullets, that I use. I use the bootstrap theme together with a child theme.
The error message disappears after reload and everything seems to work fine.

Drupal Settings:

<script type="application/json" data-drupal-selector="drupal-settings-json">{"path":{"baseUrl":"\/","scriptPath":null,"pathPrefix":"","currentPath":"node\/2","currentPathIsAdmin":false,"isFront":true,"currentLanguage":"de"},"pluralDelimiter":"\u0003","ajaxPageState":{"libraries":"admin_toolbar\/toolbar.tree,admin_toolbar_tools\/toolbar.icon,bootstrap\/popover,bootstrap\/tooltip,coffee\/drupal.coffee,contextual\/drupal.contextual-links,contextual\/drupal.contextual-toolbar,core\/drupal.active-link,core\/html5shiv,devel\/devel-toolbar,history\/mark-as-read,quickedit\/quickedit,mytheme\/global-styling,shortcut\/drupal.shortcut,statistics\/drupal.statistics,system\/base,toolbar\/toolbar,toolbar\/toolbar.escapeAdmin,user\/drupal.user.icons,views\/views.module,views_slideshow\/jquery_hoverIntent,views_slideshow\/pager_bullets,views_slideshow\/widget_info,views_slideshow_cycle\/jquery_cycle,views_slideshow_cycle\/json2,views_slideshow_cycle\/views_slideshow_cycle","theme":"mytheme","theme_token":null},"ajaxTrustedUrl":{"\/suche":true},"coffee":{"maxResults":7},"bootstrap":{"forms_has_error_value_toggle":1,"modal_animation":1,"modal_backdrop":"true","modal_keyboard":1,"modal_show":1,"modal_size":"","popover_enabled":1,"popover_animation":1,"popover_container":"body","popover_content":"","popover_delay":"0","popover_html":0,"popover_placement":"right","popover_selector":"","popover_title":"","popover_trigger":"click","popover_trigger_autoclose":1,"tooltip_enabled":1,"tooltip_animation":1,"tooltip_container":"body","tooltip_delay":"0","tooltip_html":0,"tooltip_placement":"auto left","tooltip_selector":"","tooltip_trigger":"hover"},"statistics":{"data":{"nid":"2"},"url":"\/core\/modules\/statistics\/statistics.php"},"history":{"nodesToMarkAsRead":{"2":true}},"toolbar":{"breakpoints":{"toolbar.narrow":"only screen and (min-width: 16.5em)","toolbar.standard":"only screen and (min-width: 38.125em)","toolbar.wide":"only screen and (min-width: 61em)"},"subtreesHash":"AQdcDapCrtA2-48Urrd7f-mBjjxNO2G591jNkUIu2ig"},"viewsSlideshowPagerFields":{"slider_frontpage-slider_frontpage":{"bottom":{"activatePauseOnHover":null}}},"viewsSlideshowPager":{"slider_frontpage-slider_frontpage":{"bottom":{"type":"viewsSlideshowPagerBullets"}}},"viewsSlideshowCycle":{"#views_slideshow_cycle_main_slider_frontpage-slider_frontpage":{"num_divs":5,"id_prefix":"#views_slideshow_cycle_main_","div_prefix":"#views_slideshow_cycle_div_","vss_id":"slider_frontpage-slider_frontpage","effect":"fade","transition_advanced":0,"timeout":5000,"speed":700,"delay":0,"sync":1,"random":0,"pause":1,"pause_on_click":0,"action_advanced":0,"start_paused":0,"remember_slide":0,"remember_slide_days":1,"pause_in_middle":0,"pause_when_hidden":0,"pause_when_hidden_type":"full","amount_allowed_visible":"","nowrap":0,"fixed_height":1,"items_per_slide":1,"items_per_slide_first":0,"items_per_slide_first_number":1,"wait_for_image_load":1,"wait_for_image_load_timeout":3000,"cleartype":0,"cleartypenobg":0,"advanced_options":"{\u0022timeout\u0022:\u002215000\u0022}","advanced_options_choices":0,"advanced_options_entry":""}},"viewsSlideshow":{"slider_frontpage-slider_frontpage":{"methods":{"goToSlide":["viewsSlideshowSlideCounter","viewsSlideshowPager","viewsSlideshowCycle"],"nextSlide":["viewsSlideshowSlideCounter","viewsSlideshowPager","viewsSlideshowCycle"],"pause":["viewsSlideshowControls","viewsSlideshowCycle"],"play":["viewsSlideshowControls","viewsSlideshowCycle"],"previousSlide":["viewsSlideshowSlideCounter","viewsSlideshowPager","viewsSlideshowCycle"],"transitionBegin":["viewsSlideshowSlideCounter","viewsSlideshowPager"],"transitionEnd":[]},"paused":0}},"user":{"uid":"1232","permissionsHash":"8d194d7962a38659010be142a0b998fac83f6914ffc85bf390d988dfce0785b0"}}

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

julius95 created an issue. See original summary.

tibezh’s picture

Version: 8.x-4.6 » 8.x-4.x-dev
Status: Active » Needs work
FileSize
1.44 KB

I have some problems.
Here is a patch for fix problem. Patch add an option "Activate Slide on Pager Hover" + fix notice.
After apply patch need resave a style plugin settings.

tibezh’s picture

Status: Needs work » Needs review
iryston’s picture

Thanks, Ivan!
#2 works for me.

kmajzlik’s picture

Title: Changes in the view and cache clearing produce an error » Notice: Undefined index: views_slideshow_pager_bullets
kmajzlik’s picture

andrezstar’s picture

I still have the prob after applying the patch.
It only disappears if i desactivate the option "pause on hover" of the viewslideshow options

h3rj4n’s picture

FileSize
1.7 KB
1.44 KB

The patch from #2 did not work for me. Changed some names and the following patch worked for me (running version 4.6).

pbosmans’s picture

With patch #8 the undefined index notice is gone but when a new notice appears when i go into the slideshow view-settings :

Notice: Array to string conversion in Drupal\Core\Render\Element\Checkbox::processCheckbox() (line 129 of \core\lib\Drupal\Core\Render\Element\Checkbox.php).

richgerdes’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #8 works for me. I don't receive any errors as mention in #9. Marking RTBC.

richgerdes’s picture

Priority: Normal » Critical
StepanISK’s picture

Thanks, h3rj4n!
#8 works for me.

israelshmueli’s picture

Still getting the notice message even after applying the patch/es.
seems to work at first but a message shows up again after changed and saved slideshow settings.

Message stopped after I went to that line 295 and set

 'activatePauseOnHover' => '',  

intead of

'activatePauseOnHover' => $vars['settings']['views_slideshow_pager_bullets']['views_slideshow_pager_bullets_hover'],

I am enclosing this unsatisfying solution as a patch.

israelshmueli’s picture

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

@israelshmueli is right, patch is not complete. There is some typo in it. Variable name should be views_slideshow_pager_bullets_hover, not views_slideshow_pager_bullets.

views_slideshow_pager_bullets is id of ViewsSlideshowWidget plugin

/**
 * Provides a pager using bullets.
 *
 * @ViewsSlideshowWidget(
 *   id = "views_slideshow_pager_bullets",
 *   type = "views_slideshow_pager",
 *   label = @Translation("Bullets"),
 * )
 */

Here corrected patch.

gtucker6’s picture

I used @sakiland's code to create a new patch with a test. This is working for me with no errors currently.

g089h515r806’s picture

Apply patch 16 and
change the code
from
'activatePauseOnHover' => $vars['settings']['views_slideshow_pager_bullets']['views_slideshow_pager_bullets_hover'],
to :

'activatePauseOnHover' => isset($vars['settings']['views_slideshow_pager_bullets']['views_slideshow_pager_bullets_hover']) ? $vars['settings']['views_slideshow_pager_bullets']['views_slideshow_pager_bullets_hover'] : '',

fix this issue.

xaver’s picture

Unfortunately doesen't work for me,

I've applied patch 16

Drupal version : 8.6.1
Drupal bootstrap : Successful
PHP binary : /usr/bin/php7.1

Notice: Undefined index: views_slideshow_pager_bullets in template_preprocess_views_slideshow_pager_bullets() (line 295 of modules/contrib/views_slideshow/views_slideshow.theme.inc).
template_preprocess_views_slideshow_pager_bullets(Array, 'views_slideshow_pager_bullets', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_slideshow_pager_bullets', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 221)
template_preprocess_views_slideshow_pager_widget_render(Array, 'views_slideshow_pager_widget_render', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('views_slideshow_pager_widget_render', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 77)
__TwigTemplate_f54b7c1e2bbeec00da4446a08b1c899baf1e0440a8b84f71fde8dfb3ee774c78->doDisplay(Array, Array) (Line: 432)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403)
Twig_Template->display(Array) (Line: 411)
Twig_Template->render(Array) (Line: 64)
twig_render_template('modules/contrib/views_slideshow/templates/views-view-slideshow.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('views_view_slideshow', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 490)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 117)
__TwigTemplate_532bd15a1ee96b91d410ad8b8f05717c156aa86733c3c964a524ef7b00f7f6db->doDisplay(Array, Array) (Line: 432)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 403)
Twig_Template->display(Array) (Line: 411)
Twig_Template->render(Array) (Line: 64)
twig_render_template('themes/contrib/bootstrap/templates/views/views-view.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('views_view', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 450)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 76)
Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 38)
Drupal\webprofiler\StackMiddleware\WebprofilerMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 665)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

dww’s picture

Priority: Critical » Major
Status: Needs review » Needs work
Issue tags: -views slideshow, -error, -pager bullets

Thanks everyone for your work in here!

Patches #15 and #16 are nearly identical files, with no visible interdiff.

@Gtucker6: If there was supposed to be a test with #16, it wasn't added to the git command that generated the patch file. Please consider re-uploading (ideally with first a test-only patch, and then a full patch with the fix).

@g089h515r806: Please upload #17 as a patch if possible.

@xaver re: #18: You still have to visit each view and re-save the settings for the fix to go into effect.

Which brings me to: we probably need an update function that adds the missing setting to existing views using a slideshow display. :/ That's rarely fun, but perhaps needed before this is RTBC.

Otherwise, we at least need the fix from #17 as a working patch, since #15/#16 still depend on re-saving each view to stop generating errors.

Thanks,
-Derek

sitiveni’s picture

Combined #16 + #17 into one patch.
It did resolve my issue. Thanks to all.

Ollie222’s picture

The patch in #20 applied to the latest dev version looks to have fixed the warnings for me too.

ivnish’s picture

#20 works for me! Thanks!

DD 85’s picture

#20 works for me! Thanks!

DrupalDope’s picture

thanks, #20 worked for me as well

ivnish’s picture

Status: Needs work » Reviewed & tested by the community
Dinesh18’s picture

#20 works perfectly fine. +1 to RTBC

Anatoliy Vorobyov’s picture

#20 worked for me!

  • NickWilde committed 5357625 on 8.x-4.x authored by sitiveni
    Issue #2926311 by h3rj4n, israelshmueli, tibezh, Gtucker6, sitiveni,...
NickDickinsonWilde’s picture

Status: Reviewed & tested by the community » Fixed

Applied - with a minor change. using `??` instead of the `isset($value) $value : $alt` pattern.
Thanks y'all

Status: Fixed » Closed (fixed)

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

Erso’s picture

#20 worked for me after
-Save without bullet
-Save with bullet
-Clear

ressa’s picture

Thanks for fixing this. Since the last release was November 2017 is it worth considering a fresh release, so everyone can make good use of this improvement?

DD 85’s picture

Yes

Matt B’s picture

This is not fixed - I still get the issue and I'm on the latest version of this module and drupal. Please re-open the issue, fix and create a new module release.

ivnish’s picture

Matt, this was fixed in the dev version. But last release version at 2017. Needs create new stable release

Matt B’s picture

Version: 8.x-4.x-dev » 8.x-4.6

Needs to stay open as a bug against the latest stable version then. When will a new stable version be released? I don't want to run dev code if I can possible avoid it.

ivnish’s picture

No. Bug was fixed. Needs wait while project maintainer create new stable release. You can try to contact with maintainer using contact form in the user profile

ressa’s picture

Just a tip: If you use the Bootstrap theme and can't wait for a new release, you can also make a carousel with Views Bootstrap.

osopolar’s picture

Fixed in release 8.x-4.7.