When I enable this module, I get this error:
Warning: Illegal offset type in drupal_add_js() (line 4000 of /[path_to_drupal]/includes/common.inc).

This is a site upgraded from Drupal 6. I am running Drupal 7 final.

I am also running these modules:

  • Block (core)
  • Color (core)
  • Comment (core)
  • Database logging (core)
  • Field (core)
  • Field SQL storage (core)
  • Field UI (core)
  • File (core)
  • Filter (core)
  • Help (core)
  • List (core)
  • Menu (core)
  • Node (core)
  • Number (core)
  • Path (core)
  • PHP Filter (core)
  • Search (core)
  • System (core)
  • Taxonomy (core)
  • Text (core)
  • Tracker (core)
  • Update manager (core)
  • User (core)
  • Administration menu
  • Administration menu Toolbar style
  • Chaos tools
  • Link
  • Automatic Nodetitles
  • DHTML Menu
  • Global Redirect
  • Gravatar
  • Views
  • Views UI

The error definitely is related to when I have SaveGuard enabled with one exception: it also shows when I uncheck SaveGuard at admin/modules and hit Save configuration. I guess this could be because the error actually happened after the errors were produced for the prior page?

CommentFileSizeAuthor
#3 saveguard-2-1020164.patch530 byteskojis

Comments

aren cambre’s picture

[deleting incorrect comment]

BasM’s picture

Having the same error, using different modules though.

I'm not that used to debugging/scripting but i'd like to see some improvements and will help where i can.

anyone have an idea what causes this issue?

kojis’s picture

StatusFileSize
new530 bytes

Hi there,

This resolved it for me, around line 59 of the saveguard.module:
drupal_add_js($settings, array('type' => array('type' => 'setting'), 'scope' => JS_DEFAULT));

Change to:
drupal_add_js($settings, array('type' => 'setting', 'scope' => 'header', 'group' => JS_DEFAULT));

See attached patch.

deekayen’s picture

Status: Active » Fixed

committed

Status: Fixed » Closed (fixed)

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