Closed (fixed)
Project:
Agreement
Version:
3.0.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Jul 2023 at 18:22 UTC
Updated:
25 Apr 2024 at 17:09 UTC
Jump to comment: Most recent
Version 3.x works fine so far, the queries for agreements follow, are saved etc pp. I wanted to customize the view slightly to my own requirements, this is unfortunately not mögich and ends with a WSOD under Drupal 9.5.9 & 10.1 with PHP 8.1.
Here is the error message:
Warning: Undefined array key "" in /var/www/html/docroot/core/modules/views_ui/src/ViewFormBase.php on line 162
Warning: Trying to access array offset on value of type null in /var/www/html/docroot/core/modules/views_ui/src/ViewFormBase.php on line 162
The website encountered an unexpected error. Please try again later.
TypeError: views_ui_truncate(): Argument #1 ($string) must be of type string, null given, called in /var/www/html/docroot/core/modules/views_ui/src/ViewFormBase.php on line 163 in views_ui_truncate() (line 348 of core/modules/views_ui/views_ui.module).
Drupal\views_ui\ViewFormBase->getDisplayLabel(Object, NULL, ) (Line: 411)
Drupal\views_ui\ViewEditForm->getDisplayDetails(Object, Array) (Line: 383)
Drupal\views_ui\ViewEditForm->getDisplayTab(Object) (Line: 212)
Drupal\views_ui\ViewEditForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object) (Line: 41)
Drupal\views_ui\ViewFormBase->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('view_edit_form', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit', Array) (Line: 230)
Drupal\views_ui\Controller\ViewsUIController->edit(Object, NULL)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 583)
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: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 74)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)/admin/structure/views/view/user_agreements1. Write a post-update hook to update config objects.
2. Update optional configuration to Drupal 10.
- Create issue fork/merge request fixing 1-2 above.
No
No, but newer versions will only support >10.
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
mradcliffeThank you for reporting the issue.
Do you have more details about what exactly you were changing?
I tried to reproduce and I was able to edit and save the view after making changes.
Comment #3
slowflyer commentedI cant edit the view as well. When trying to edit I receive on Drupal 10.2.4, php 8.2:
Error: Call to a member function isEnabled() on null in Drupal\views_ui\ViewEditForm->getDisplayDetails() (line 421 of core/modules/views_ui/src/ViewEditForm.php).
Drupal\views_ui\ViewEditForm->getDisplayTab(Object) (Line: 212)
Drupal\views_ui\ViewEditForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object) (Line: 41)
Drupal\views_ui\ViewFormBase->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('view_edit_form', Object) (Line: 283)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit', Array) (Line: 230)
Drupal\views_ui\Controller\ViewsUIController->edit(Object, NULL)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->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: 53)
Asm89\Stack\Cors->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #4
mradcliffeHmm, I am still having trouble reproducing this issue.
I launched DrupalPod with Drupal 10.2.4 and switched to using PHP 8.2.
However I think what may help on your site, if you export your configuration via the Configuration > Development > Configuration Synchronization > Import interface, you may be able to update the YAML manually.
I exported the configuration out of DrupalPod successfully as the following. Try importing the following YAML after updating the first line here. If that works, then I think I have a path forward.
It's possible that on an existing site views did not update all the views or a database update/post-update for views went wrong causing malformed data.
Comment #5
slowflyer commentedThis causes the error:
This works:
Comment #6
mradcliffeThank you for the feedback, I think I have a path forward.
Comment #7
mradcliffeAdding the novice task in case I don't take care of this myself in the near future. I think I've outlined the two next steps in the issue to creat ea merge request.
Comment #9
mradcliffeWriting a test isn't going to be possible, but I confirmed with some manual testing in DrupalPod that a post-update adds the missing id.
I updated the default views to be based on Drupal 10.1 exports.
Comment #11
mradcliffe