Feature #4405

EmptyView is misleading

Added by Bastian Waidelich about 12 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC
Start date:
2009-08-31
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

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..


Files

4405_EmptyView_is_misleading.patch (9.52 KB) 4405_EmptyView_is_misleading.patch FLOW3 Patch (replaces EmptyView by NotFoundView) Bastian Waidelich, 2009-09-04 11:49
4405_Testing.patch (1.15 KB) 4405_Testing.patch Testing Patch (adjusts Testing package accordingly) Bastian Waidelich, 2009-09-04 11:49
#1

Updated by Bastian Waidelich about 12 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 about 12 years ago

  • Assignee set to Bastian Waidelich

I'll provide a patch with the suggested changes

#3

Updated by Bastian Waidelich about 12 years ago

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

Robert Lemke: Please validate the patches

#4

Updated by Karsten Dambekalns about 12 years ago

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

Updated by Karsten Dambekalns about 12 years ago

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

Applied in changeset r3212.

Also available in: Atom PDF