After installing the Popup On Load module and configuring it as User 1. I didn't notice any issue, it was only when I tried to give another user access to administer the Popup On Load module that I noticed an issue. If you don't have full permissions to Text Formats you get the following message.

This field has been disabled because you do not have sufficient permissions to edit it.

After some looking around it appears that the Popup On Load module tries to set the Text Format when it loads. This causes a problem if no Text Format is set in the $popup_onload->format variable.

I have fixed this problem by adding a check for that variable.

  if (!empty($popup_onload->format)) {
    $form['body']['#format'] = $popup_onload->format;
  }

I will submit a patch soon.

Comments

johnpicozzi’s picture

Status: Active » Needs review
StatusFileSize
new0 bytes

Here is the patch that I was talking about in the original issue. Added a check for the format variable in the admin.inc file.

steveoriol’s picture

The patch #1 :text-format-permission-issue-2447965-2.patch is empty...

johnpicozzi’s picture

StatusFileSize
new483 bytes

Well that's strange... Here is one that works. Thanks for the heads up @steveoriol!!

johnpicozzi’s picture

josebc’s picture

patch in no3 didn't work for me, here is another one using filter_default_format() which handles permissions

  • itcrowd72 committed cd67882 on 7.x-1.x authored by josebc
    Issue #2447965 by johnpicozzi, josebc, itcrowd72: Text Format Permission...
ivnish’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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