Problem/Motivation

General Diff settings page is showing a warning.
It will go away when we save the config again.

Steps to reproduce

Given I am logged in with the “webmaster” user
When I navigate to "/admin/config/content/diff/general"
Then I see

Error message
Warning: Undefined array key "visual_default_view_mode" in Drupal\diff\Form\GeneralSettingsForm->buildForm() (line 188 of modules/contrib/diff/src/Form/GeneralSettingsForm.php).
Drupal\diff\Form\GeneralSettingsForm->buildForm()
call_user_func_array() (Line: 528)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 279)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 97)
Drupal\autosave_form\Form\AutosaveFormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 622)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 54)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 53)
Asm89\Stack\Cors->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Proposed resolution

  • Change the default config for diff.settings to follow with the new schema config.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-10.1.0-alpha3, varbase_core-10.1.55, varbase-10.0.7, varbase_core-10.0.51, varbase-9.1.11, varbase_core-9.1.56

Varbase update type

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

After the fix:
Varbase is not using the default settings from the Diff module
It has a custom config for a better editorial view
Diff settings

Revision information page
Revision information

Compare selected revisions
Compare selected revisions

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3540819: Fixed warning on Diff General Settings form: Undefined array key "visual_default_view_mode"

Comments

rajab natshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Assigned: rajab natshah » s.halawani
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.0-beta1, +varbase_core-10.1.55
StatusFileSize
new200.06 KB
rajab natshah’s picture

Assigned: s.halawani » Unassigned
Status: Needs review » Fixed

  • rajab natshah committed 65abe48d on 10.1.x
    Issue #3540819: Fix warning on Diff General Settings form: Undefined...

  • rajab natshah committed 6de0e153 on 10.0.x
    Issue #3540819: Fix warning on Diff General Settings form: Undefined...

  • rajab natshah committed 2a1483ae on 9.1.x
    Issue #3540819: Fix warning on Diff General Settings form: Undefined...
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_core-9.1.56

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-10.0.7

Status: Fixed » Closed (fixed)

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

rajab natshah’s picture

Issue summary: View changes

✅ Released varbase-9.1.11