Undefined index "type" when seeing a node using the field_slideshow

Created on 29 April 2015, over 10 years ago
Updated 21 July 2025, 4 months ago

Hi everyone,

I use this module but there is a warning that I wanted to get rid of.

Problem/Motivation

As I said, the problem was a warning on the node page. Here's the warning from a simplytest instance.
Notice: Undefined index: type in template_preprocess_field_slideshow() (line 977 of /home/s9d41c68951e977f/www/sites/default/modules/field_slideshow/field_slideshow.module)

Steps to reproduce :

  • Create a new simplytest instance with the field_slideshow module 7.x-2.x-dev
  • In a content type of your choice (Basic page for example), create a field type "image". Change the number of values for this field to whatever you like (This warning is displayed even if there is only one image)
  • Go to "Manage display" for this content type
  • In "Format", put "Slideshow"
  • Create a new Basic Page node and put images in the image field
  • Go to your newly created node
  • The warning should show up

Proposed resolution

The solution is to add a check for the "type" index. The only workaround for this without a patch is to disable errors in your Drupal administration

Remaining tasks

I'll propose a patch then some of you will need to review it.

Thank you.

🐛 Bug report
Status

Closed: outdated

Version

2.0

Component

Code

Created by

🇫🇷France andrackosnack

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024