Feature #4405

EmptyView is misleading

Added by Bastian Waidelich over 3 years ago. Updated over 2 years ago.

Status:Resolved Start date:2009-08-31
Priority:Should have Due date:
Assignee:Karsten Dambekalns % Done:

100%

Category:MVC
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 5
PHP Version: Complexity:
Has patch:
Votes: 0

Description

When no template is found, FLOW3 uses \F3\FLOW3\MVC\View\EmptyView as view (see ActionController::resolveView()).
Instead we should use the NotFoundView that was introduced in r2888 to display a more meaningful error to the user.

So instead of:

if ($viewObjectName === FALSE) $viewObjectName = 'F3\FLOW3\MVC\View\EmptyView';

something like

if ($viewObjectName === FALSE) {
    $view = $this->objectManager->getObject('F3\FLOW3\MVC\View\NotFoundView');
    $view->assign('errorMessage', 'dummdidumm');
}

Then EmptyView could be removed I guess..

4405_EmptyView_is_misleading.patch - FLOW3 Patch (replaces EmptyView by NotFoundView) (9.5 kB) Bastian Waidelich, 2009-09-04 11:49

4405_Testing.patch - Testing Patch (adjusts Testing package accordingly) (1.1 kB) Bastian Waidelich, 2009-09-04 11:49

Associated revisions

Revision ade30230
Added by Karsten Dambekalns over 3 years ago

[+FEATURE] FLOW3 (MVC): Removed EmptyView and made NotFoundView display helpful message instead, resolves #4405.

History

Updated by Bastian Waidelich over 3 years ago

Bastian Waidelich wrote:

Then EmptyView could be removed I guess..

The empty magic call method from EmptyView should be added to the NotFoundView to prevent PHP from issuing a fatal error when calling non-existing methods.

Updated by Bastian Waidelich over 3 years ago

  • Assignee set to Bastian Waidelich

I'll provide a patch with the suggested changes

Updated by Bastian Waidelich over 3 years ago

Attached patches replaces EmptyView by NotFoundView in ActionController. Additionally it removes the no longer needed(?) EmptyView.

@Robert: Please validate the patches

Updated by Karsten Dambekalns over 3 years ago

  • Status changed from New to Accepted
  • Assignee changed from Robert Lemke to Karsten Dambekalns
  • Target version set to 1.0 alpha 5

Updated by Karsten Dambekalns over 3 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r3212.

Also available in: Atom PDF