Feature #4405

EmptyView is misleading

Added by Bastian Waidelich almost 6 years ago. Updated almost 5 years ago.

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

100%

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

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 Magnifier - FLOW3 Patch (replaces EmptyView by NotFoundView) (9.5 kB) Bastian Waidelich, 2009-09-04 11:49

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

Associated revisions

Revision ade30230
Added by Karsten Dambekalns almost 6 years ago

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

History

#1 Updated by Bastian Waidelich almost 6 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.

#2 Updated by Bastian Waidelich almost 6 years ago

  • Assigned To set to Bastian Waidelich

I'll provide a patch with the suggested changes

#3 Updated by Bastian Waidelich almost 6 years ago

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

@Robert: Please validate the patches

#4 Updated by Karsten Dambekalns almost 6 years ago

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

#5 Updated by Karsten Dambekalns almost 6 years ago

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

Applied in changeset r3212.

Also available in: Atom PDF