Bug #23265 Fix is in Upcoming Release

{field:my_textarea} in Channel Form white screens for guest authors when formatting buttons are enabled

Version: 3.5.11 Reporter: Derek Jones

Somewhat peculiar circumstances, but if you:

  • build your channel form with {field:my_textarea} instead of the custom fields loop,
  • and your textarea field is configured to show formatting buttons,
  • and your form allows guest authors, you will receive the following fatal PHP error after enabling debug:
Fatal error: Call to a member function getHTMLButtonsForSite() on null in system/ee/EllisLab/Addons/textarea/ft.textarea.php on line 54

Note that no error is thrown if you are using the {custom_fields}{/custom_fields} tag pair, which is the only way to reach {formatting_buttons} anyway.

  • Nobody has said anything yet.

You must be signed in to comment on a bug report.

  • On line 54 of system/ee/EllisLab/Addons/textarea/ft.textarea.php change:

    $buttons = $member->getHTMLButtonsForSite(ee()->config->item('site_id'));

    to:

    if ($member)
    {
        $buttons = $member->getHTMLButtonsForSite(ee()->config->item('site_id'));
    }
    else
    {
        $buttons = ee('Model')->get('HTMLButton')
         ->filter('site_id', ee()->config->item('site_id'))
         ->filter('member_id', 0)
         ->order('tag_order')
         ->all();
    }

ExpressionEngine News

#eecms, #events, #releases