Problem/Motivation

Not sure if this is a canvas or schemadotorg error.

  • Install canvas 1.x-dev eaf072c (I did not test without)
  • Go to non-canvas configured view mode, e.g. `/admin/structure/types/manage/schema_blog_posting/display/hda_card`
  • See fatal error below

Workaround: Uninstall schemadotorg_additional_type

The website encountered an unexpected error. Try again later.

TypeError: Drupal\canvas\Controller\ViewModeDisplayController::__construct(): Argument #1 ($entityFormController) must be of type Drupal\Core\Entity\HtmlEntityFormController, Drupal\schemadotorg_additional_type\Controller\SchemaDotOrgAdditionalTypeHtmlEntityFormController given, called in /var/www/html/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\canvas\Controller\ViewModeDisplayController->__construct() (line 21 of modules/contrib/canvas/src/Controller/ViewModeDisplayController.php).

Drupal\Component\DependencyInjection\Container->createService() (Line: 177)
Drupal\Component\DependencyInjection\Container->get() (Line: 28)
Drupal\Core\DependencyInjection\ClassResolver->getInstanceFromDefinition() (Line: 78)
Drupal\Core\Utility\CallableResolver->getCallableFromDefinition() (Line: 35)
Drupal\Core\Controller\ControllerResolver->getControllerFromDefinition() (Line: 50)
Drupal\Core\Controller\ControllerResolver->getController() (Line: 166)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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:

Comments

anruether created an issue. See original summary.

anruether’s picture

also referencing this issue, which I ran into first with canvas 1.1.0 which was fixed by updating to latest dev.

anruether’s picture

Issue summary: View changes

jrockowitz made their first commit to this issue’s fork.

jrockowitz’s picture

The error below led me to believe that the decoration of the `controller.entity_form` service was incorrect

TypeError: Drupal\canvas\Controller\ViewModeDisplayController::__construct(): Argument #1 ($entityFormController) must be of type Drupal\Core\Entity\HtmlEntityFormController, Drupal\schemadotorg_additional_type\Controller\SchemaDotOrgAdditionalTypeHtmlEntityFormController given

The MR is the best guess that the above will be fixed, but I did not test the PR with the canvas. module.

jrockowitz’s picture

Status: Active » Needs review

  • jrockowitz committed 7a250135 on 1.0.x
    fix: #3574104 Fatal error on view mode page (with canvas is installed)
    

  • jrockowitz committed 73caab41 on 1.0.x
    fix: #3574104 Fatal error on view mode page (with canvas is installed)
    
jrockowitz’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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