Skip to content

UI Component forms not related with any model throw fatal error #13573

Open
@mgarciaebo

Description

@mgarciaebo

It seems that it's impossible to create stand-alone forms using UI Components. I mean, simple forms, not attached to a collection (like the standard import-export forms), because Magento expects for a collection in order to apply filters, and a bunch of other things.

Those kind of forms can still be inserted using blocks and layout injection, as usual, but you encourage us to use UI Components. Actually, classes as Backend\Block\Widget\Form and Backend\Block\Widget\Form\Generic, has been deprecated in favor of UI Component implementation, so it makes no sense that this doesn't work.

Preconditions

  1. Magento 2.2.2; 2.3-develop
  2. Standard LAMP environment - PHP 7.1 - MySQL 5.6

Steps to reproduce

  1. Starting from a vanilla Magento, download, install and enable your own sample Form UI Component, following the instructions given at: https://github.com/magento/magento2-samples/tree/master/sample-module-form-uicomponent
  2. Go to the URL provided by the extension, which is [magento2-admin-url]/sampleform

Expected result

  1. The following sample form should be displayed:
    sample_form

Actual result

  1. A fatal error is thrown as shown here:
    admin_sampleform_index_index_key_f145dba12a93d0ec1e0bdfa0632d6f8e1fbe34d83a0f36d60001f3293f41610d_

Metadata

Metadata

Assignees

Labels

Issue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: PR CreatedIndicates that Pull Request has been created to fix issueReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject it

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions