Steps to reproduce:

  • Enable BUEditor and Contact module
  • Set permissions for Anonymous to use sitewide contact form
  • Don't save the BUEditor settings in admin/config/content/bueditor
  • Visit /contact as Anonymous

A couple of errors appear about an undefined offset. The bueditor_user_eids function assumes that the variable bueditor_roles exists, but it doesn't, unless you have saved at least once the BUEditor admin page. After saving the BUEditor settings once, the variable is created and errors disappear.

Comments

ufku’s picture

Title: bueditor_roles variable is not created, causes error while viewing textareas as anonymous » undefined offset warning on fresh install
Status: Active » Fixed

Should be checking if $roles[DRUPAL_ANONYMOUS_RID] is set. A fix committed to 6.x-2.x and 7.x-1.x branches.
Thanks for reporting.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mfarha’s picture

Status: Closed (fixed) » Active

Hey guys,

I'm able to reproduce this error on a fresh drupal 7 local install.

1. bueditor module active 7.x-1.0
2. allow commenting for anonymous users
3. refreshing a page with a comment form will display Notice: Undefined offset: 1 in bueditor_user_eids() (line 199 of /Users/macuser/Sites/sitename/sites/all/modules/bueditor/bueditor.inc).

M

ufku’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Fixed

fixed on dev branch. will be available in the next official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.