Bug #23265 Bug Fixed

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

Version: 3.5.11 Reporter: Derek Jones

This is an archived bug report. If you are experiencing a similar issue, upgrade to the latest release and if that does not solve the problem, submit a new bug report

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.
  • On line 54 of system/ee/EllisLab/Addons/textarea/ft.textarea.php change:

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


    if ($member)
        $buttons = $member->getHTMLButtonsForSite(ee()->config->item('site_id'));
        $buttons = ee('Model')->get('HTMLButton')
         ->filter('site_id', ee()->config->item('site_id'))
         ->filter('member_id', 0)
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases