Skip to content

Error on Channel Form in EE7.4 #4050

@DalizPR

Description

@DalizPR

Getting an error in a {exp:channel:form} which submits to a channel with 2 or more category groups … in the new EE 7.4. The form was working fine in EE 7.3.x. If I remove a category group (so there is only 1 category group, it works).

The error is:

Warning
Undefined array key "categories[cat_group_id_2]"
ee/ExpressionEngine/Model/Content/Display/DefaultLayout.php, line 72

Severity: E_WARNING
Error Caught
Call to a member function getId() on null
ee/ExpressionEngine/Model/Content/Display/LayoutTab.php:49

Stack Trace: Please include when reporting this error
#0 ee/ExpressionEngine/Model/Content/Display/DefaultLayout.php(72): ExpressionEngine\Model\Content\Display\LayoutTab->addField(NULL)
#1 ee/ExpressionEngine/Model/Channel/Display/DefaultChannelLayout.php(225): ExpressionEngine\Model\Content\Display\DefaultLayout->transform(Array)
#2 ee/ExpressionEngine/Model/Channel/ChannelEntry.php(863): ExpressionEngine\Model\Channel\Display\DefaultChannelLayout->transform(Array)
#3 ee/ExpressionEngine/Addons/channel/libraries/channel_form/Channel_form_lib.php(998): ExpressionEngine\Model\Channel\ChannelEntry->getDisplay()
#4 ee/ExpressionEngine/Addons/channel/libraries/channel_form/Channel_form_lib.php(270): Channel_form_lib->_build_custom_field_variables()
#5 ee/ExpressionEngine/Addons/channel/mod.channel.php(5139): Channel_form_lib->entry_form()
#6 ee/legacy/libraries/Template.php(1831): Channel->form()
#7 ee/legacy/libraries/Template.php(1506): EE_Template->process_tags()
#8 ee/legacy/libraries/Template.php(625): EE_Template->tags()
#9 ee/legacy/libraries/Template.php(248): EE_Template->parse('{!-- ra:0000000...', false, 1, false)
#10 ee/legacy/libraries/Template.php(178): EE_Template->fetch_and_parse('', '', false)
#11 ee/legacy/libraries/Core.php(811): EE_Template->run_template_engine('', '')
#12 ee/legacy/controllers/ee.php(53): EE_Core->generate_page()
#13 [internal function]: EE->index()
#14 ee/ExpressionEngine/Core/Core.php(268): call_user_func_array(Array, Array)
#15 ee/ExpressionEngine/Core/Core.php(124): ExpressionEngine\Core\Core->runController(Array)
#16 ee/ExpressionEngine/Boot/boot.php(184): ExpressionEngine\Core\Core->run(Object(ExpressionEngine\Core\Request))
#17 index.php(164): require_once('...')
#17 index.php(164): require_once('...')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: AcceptedBug has been confirmed, is reproducible, and ready to work on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions