Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have visited display suite manage display page & I got some notice errors so I have report this issue. The current ds version which I am using is 8.x-3.4 and drupal core version is 8.7.8.
Comment | File | Size | Author |
---|---|---|---|
#34 | 3091319-34.patch | 738 bytes | acbramley |
#14 | ds-undefined-index-type-3091319-14.patch | 758 bytes | merlin06 |
#4 | ds_field_ui_notices_errors-3091319-3.patch | 1.25 KB | Devendra Mishra |
Issue fork ds-3091319
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:
- 3091319-notice-undefined-index changes, plain diff MR !5
Comments
Comment #2
Devendra Mishra CreditAttribution: Devendra Mishra commentedHere is the patch
Comment #3
Devendra Mishra CreditAttribution: Devendra Mishra commentedComment #4
Devendra Mishra CreditAttribution: Devendra Mishra commentedComment #5
Devendra Mishra CreditAttribution: Devendra Mishra commentedPlease review attached patch & let me know if it help to fix these notices.
Comment #6
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedHmm how can I reproduce the notices ?
Also, I think we can simplify the code by just doing something like this:
Comment #7
mediameriquat CreditAttribution: mediameriquat as a volunteer commentedAnybody got such a problem with DS 8.x-3.12, with Drupal 9.2.0, using a Bootstrap Theme?
Here is the full error message :
Notice: Undefined index: #type in _ds_field_ui_table_layouts() (line 826 of modules/ds/includes/field_ui.inc).
_ds_field_ui_table_layouts('node', 'speaker', 'full', Array, Object) (Line: 51)
ds_field_ui_fields_layouts(Array, Object) (Line: 241)
ds_form_entity_view_display_edit_form_alter(Array, Object, 'entity_view_display_edit_form') (Line: 539)
Drupal\Core\Extension\ModuleHandler->alter('form', Array, Object, 'entity_view_display_edit_form') (Line: 836)
Drupal\Core\Form\FormBuilder->prepareForm('entity_view_display_edit_form', Array, Object) (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 578)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 716)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #8
Rar9 CreditAttribution: Rar9 commentedyes on D9.2.0 with 3.12.0 I´m getting with Radix a BS4 theme
Error message
Notice: Undefined index: #type in _ds_field_ui_table_layouts() (line 826 of modules/contrib/ds/includes/field_ui.inc).
The above patch will not apply
Comment #11
FMB CreditAttribution: FMB commentedGetting same errors as mediameriqua, see merge request.
(Click plain diff link to get a patch.)
Comment #12
sbrenner02 CreditAttribution: sbrenner02 commentedJut updated and getting this now on D9 with DS 3.11
Comment #13
hamadknows CreditAttribution: hamadknows as a volunteer commentedGetting same warning on D9
Comment #14
merlin06 CreditAttribution: merlin06 at Australian Competition and Consumer Commission (ACCC) commentedError appears on /admin/structure/types/manage/%/display/teaser and other display forms.
Notice: Undefined index: #type in _ds_field_ui_table_layouts() (line 826 of /srv/www/sites/brad82.dev.drupal.local/web/modules/contrib/ds/includes/field_ui.inc)
This patch applies to 8.x-3.13.
The offending section of code is commented out in 8.x-4.x-dev so the maintainer is already aware of this issue.
Any module that overrides LayoutDefault::buildConfigurationForm() and then calls parent::buildConfigurationForm() receives a value of $form['context_mapping']. Display Suite isn't handling this correctly.
Comment #15
jannakha CreditAttribution: jannakha as a volunteer and at Tomato Elephant Studio commentedComment #16
bart lambert CreditAttribution: bart lambert commentedHere the same error on D9.2.4 and DS-module 8.3.13. using AT-theme 2.0
Notice: Undefined index: #type in _ds_field_ui_table_layouts() (regel 826 van /data/sites/web/modelspoorhobbybe/www/modules/contrib/ds/includes/field_ui.inc)
#0 /data/sites/web/modelspoorhobbybe/www/core/includes/bootstrap.inc(312): _drupal_error_handler_real()
#1 /data/sites/web/modelspoorhobbybe/www/modules/contrib/ds/includes/field_ui.inc(826): _drupal_error_handler()
#2 /data/sites/web/modelspoorhobbybe/www/modules/contrib/ds/includes/field_ui.inc(51): _ds_field_ui_table_layouts()
#3 /data/sites/web/modelspoorhobbybe/www/modules/contrib/ds/ds.module(241): ds_field_ui_fields_layouts()
#4 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/Extension/ModuleHandler.php(539): ds_form_entity_view_display_edit_form_alter()
#5 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/Form/FormBuilder.php(836): Drupal\Core\Extension\ModuleHandler->alter()
#6 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/Form/FormBuilder.php(279): Drupal\Core\Form\FormBuilder->prepareForm()
#7 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#8 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#9 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#10 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/Render/Renderer.php(578): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#11 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#12 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#13 /data/sites/web/modelspoorhobbybe/www/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /data/sites/web/modelspoorhobbybe/www/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#15 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle()
#16 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle()
#17 /data/sites/web/modelspoorhobbybe/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#18 /data/sites/web/modelspoorhobbybe/www/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#19 /data/sites/web/modelspoorhobbybe/www/modules/contrib/advban/src/AdvbanMiddleware.php(57): Drupal\page_cache\StackMiddleware\PageCache->handle()
#20 /data/sites/web/modelspoorhobbybe/www/core/modules/ban/src/BanMiddleware.php(50): Drupal\advban\AdvbanMiddleware->handle()
#21 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\ban\BanMiddleware->handle()
#22 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#23 /data/sites/web/modelspoorhobbybe/www/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#24 /data/sites/web/modelspoorhobbybe/www/core/lib/Drupal/Core/DrupalKernel.php(717): Stack\StackedHttpKernel->handle()
#25 /data/sites/web/modelspoorhobbybe/www/index.php(19): Drupal\Core\DrupalKernel->handle()
#26 {main}
.
Comment #17
MLZRI apply #14 and this works.
(Apply the patch by hand, so I don't know what happens with 'patch' command, -> in reaction of 'patch failed to apply')
Comment #18
2phaI got this too when using the bootstrap barrio theme.
Updating issue title to reflect current notice people are experiencing.
Comment #19
gerzenstl CreditAttribution: gerzenstl at 42mate commentedI can also confirm #14 works.
On my case I have installed bootstrap barrio theme. This error happens when you select one of the layouts provided by this theme.
Comment #20
ainsofs CreditAttribution: ainsofs commented#14 worked for me too on ds 3.13.0 and d 9.2.6 using bootstrap theme 8.x-3.23
Comment #21
bart lambert CreditAttribution: bart lambert commented#14 works for me as wel on 8.x-3.13/ D9.2.7/PHP8.0.12
error was located on line 826 of field_ui.inc
Comment #22
ABaier CreditAttribution: ABaier commentedThanks, #14 works also for me.
DS 8.x-3.13 / Core 9.2.10 / PHP 7.4.26 / adaptivetheme
Comment #23
prabha1997 CreditAttribution: prabha1997 at QED42 for QED42 commented#14 Worked for me.
Core 9.3.0 / PHP 7.4.0 / DS 8.x-3.13 / Gin
Comment #24
Alex MalkovThanks, #14 works for me.
DS 8.x-3.13 / Core 9.3.3 / PHP 8.0.15 / Adaptivetheme
Comment #25
MLZR#14 works for me.
DS 8.x-3.13 / Core 9.3.5 / PHP 7.4 / Bootstrap 8.x-3.23 (in subtheme)
Thanks!
Comment #26
newswatch CreditAttribution: newswatch commentedConfirmed: Patch #14 works for me. Thank you.
Comment #28
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedComment #30
swentel CreditAttribution: swentel at eps & kaas commentedcommitted and pushed
Comment #31
swentel CreditAttribution: swentel at eps & kaas commentedComment #32
newswatch CreditAttribution: newswatch commentedUPDATE from my own #26 comment:
After upgrade doesn't work on Drupal 9.5.0 and PHP 8.1.13.
UPDATE (15 Jan 2023): Doesn't work on D 9.5.1, PHP 8.1.14, DS 8.3.15
Comment #33
janvier005I can confirm that the problem remains visible in Drupal 9.5.1 and that the patch #14 worked for me.
Comment #34
acbramley CreditAttribution: acbramley at PreviousNext for Service NSW commentedThis still needs a backport to 8.x-3.x, here's a reroll.
EDIT: Hmm seems vim messed up the indentation, can just be fixed on commit :)
Comment #35
MLZRHello, I have the site + environment updated and all modules new installed. This problem occurred again (see #25) and again I applied the patch #14. This works (again).. top.
the environment now is PHP 8.1, Drupal 9.5.2, and Bootstrap 8.x-3.25 - DS 8.x-3.15 new installed (so I had to patch again)
Comment #36
tvb CreditAttribution: tvb commentedPatch #34 fixes the issue.
Drupal 9.5.2 | PHP 8.1.13 | DS 8.x-3.15 | bootstrap5 3.0.3
Comment #37
khanz CreditAttribution: khanz commentedWarning: Undefined array key "#type" in _ds_field_ui_table_layouts()
Was getting a similar error with Drupal - 9.5.10 and PHP - 8.1.21, which goes away after applying patch #34. Can a new version be released with the above patch?
Comment #38
jannakha CreditAttribution: jannakha as a volunteer and at Tomato Elephant Studio commentedit looks like it was merged into v5, but not released for v3
if you're on v3 - use a patch #14 (which is the same as patch #34)
Comment #39
MupsiCan confirm I had the notice on a Drupal 10.1.7 instance with DS 3.15, after a migration from 9.5.11. Patch in #14 fixed it for me :)
Comment #40
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedThis issue is marked as fixed but the patch is still not included in the new release 8.x-3.16.
The status should be RTBC and this needs to be included in a new release please.
Thank you!
Comment #41
swentel CreditAttribution: swentel at eps & kaas commentedJust committed that to 8.x-3.x as well - will come up in a new release with more fixes for D10.1 and higher (plus hopefully some stuff I've done in 5.0.x which are easy to backport)
Comment #43
entropea CreditAttribution: entropea at enCircle Solutions Ltd. commentedJust a heads up... If I select "No display" to avoid this error, the "Expert" field formatter settings are not saved and there is no error message. Just in case anyone comes across this. Patch #14 worked on 10.1 for me.