Problem/Motivation

When installing AddThis 7.x-4.0-alpha4 on a clean setup, with no AddThis installed before, the AddThis block give a (White Screen of Dead) WSOD. Other versions before alpha5 might have this problem too.

The Apache error.log returns.

PHP Fatal error:  Unsupported operand types in /sites/all/modules/addthis/addthis.module on line 257, referer: http://example.com/admin/structure/block
PHP Stack trace:, referer: http://example.com/admin/structure/block
PHP   1. {main}() /index.php:0, referer: http://example.com/admin/structure/block
PHP   2. menu_execute_active_handler() /index.php:21, referer: http://example.com/admin/structure/block
PHP   3. call_user_func_array:{/includes/menu.inc:519}() /includes/menu.inc:519, referer: http://example.com/admin/structure/block
PHP   4. drupal_get_form() /includes/menu.inc:519, referer: http://example.com/admin/structure/block
PHP   5. drupal_build_form() /includes/form.inc:130, referer: http://example.com/admin/structure/block
PHP   6. drupal_prepare_form() /includes/form.inc:351, referer: http://example.com/admin/structure/block
PHP   7. drupal_alter() /includes/form.inc:1128, referer: http://example.com/admin/structure/block
PHP   8. addthis_form_block_admin_configure_alter() /includes/module.inc:1101, referer: http://example.com/admin/structure/block
PHP   9. _addthis_settings_form() /sites/all/modules/addthis/includes/addthis.block.inc:103, referer: http://example.com/admin/structure/block

Basicly the value that was beeing set is not a array so the + operator at that line is incorrect.
This issue is fixed in #2181367: Error Fatal error: Unsupported operand types and release in 7.x-4.0-alpha5.

Proposed resolution

Update to any released version above 7.x-4.0-alpha4.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Original post

I installed the module and enabled the block and when I clicked the "configure" link on the admin/structure/block page I ended up with a blank page. I checked my logs and no errors were logged by Drupal or Apache.

I expected to see whatever configuration options are available for the block. I'm not sure what those options are, since the page never rendered.

Comments

joshuautley’s picture

I can confirm this is happening to me as well.

matglas86’s picture

Do you have field ui enabled. The vonfig uses functions that are in there.

joshuautley’s picture

Yes and confirmed.

matglas86’s picture

Confirmed to be working?

matglas86’s picture

Confirmed to be working?

joshuautley’s picture

Confirmed "enabled".

joshuautley’s picture

NOTE: This does not happen with the DEV version.

Anonymous’s picture

I'm seeing this problem as well, with addthis-7.x-4.0-alpha4. I cannot configure the block, and so it doesn't show up because I can't add any services to it.

In the log, i get this error:

Message The following module is missing from the file system: .

Which is mysterious, because whatever module is missing doesn't seem to be there.

I'm running this on Ubercart, but otherwise I don't think I have any modules that would interfere.

I have had this problem both with and without installing display_suite.

I tried to work around this by using "drush vset" to manually set the variables to make the block show up, but I'm not sure I can do that on the commandline because of all the newlines and returns involved.

matglas86’s picture

Status: Active » Postponed (maintainer needs more info)

And do you all have the submodule AddThis Displays installed?

Vincent Verheyen’s picture

I'm getting an error when I try to configure AddThis as a block assigned to a region. I get the error:

Fatal error: Unsupported operand types in ...URL.../addthis/addthis.module on line 257

Also, the AddThis module sais it is supposed to be able to configure permissions. However, there exists no entry for AddThis in the permissions page after installation and enabling the module.

Greetings!

  • P.S.: This happens regardless of having "AddThis Displays" enabled or not.
Rodricus’s picture

I also experience this problem: ending up with a blank page when clicking on configure link on the admin/structure/block page. I have AddThis Displays installed and enabled and also field ui.

krishnair’s picture

Change this on line 257 in addthis.module
$settings += $formatter_settings;
to this
$settings[] = $formatter_settings;

This should fix the issue.

Regards
KP

Vincent Verheyen’s picture

@krishnair

Very nice debug. Both the issues of

  • not being able to view/edit AddThis's permissions,
  • as well as not being able to assign AddThis as a block to a region

are fixed by your modification in comment #12.

Thanks,
V.

zarabatana’s picture

I confirm that the fix provided in comment #12 works good.
I think this should be committed as soon as possible.

Best regards

matglas86’s picture

Please try to update to the latest 7.x-4.0-alpha5 to see if the problem is still there.

bbc’s picture

I'm seeing this with alpha6. The fix in comment #12 seems to have worked nicely.

matglas86’s picture

Title: Configure Block » WSOD on Configure Block
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#2181367: Error Fatal error: Unsupported operand types

Updated summary