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
Comment #1
joshuautley commentedI can confirm this is happening to me as well.
Comment #2
matglas86 commentedDo you have field ui enabled. The vonfig uses functions that are in there.
Comment #3
joshuautley commentedYes and confirmed.
Comment #4
matglas86 commentedConfirmed to be working?
Comment #5
matglas86 commentedConfirmed to be working?
Comment #6
joshuautley commentedConfirmed "enabled".
Comment #7
joshuautley commentedNOTE: This does not happen with the DEV version.
Comment #8
Anonymous (not verified) commentedI'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.
Comment #9
matglas86 commentedAnd do you all have the submodule AddThis Displays installed?
Comment #10
Vincent Verheyen commentedI'm getting an error when I try to configure AddThis as a block assigned to a region. I get the error:
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!
Comment #11
Rodricus commentedI 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.
Comment #12
krishnair commentedChange this on line 257 in addthis.module
$settings += $formatter_settings;
to this
$settings[] = $formatter_settings;
This should fix the issue.
Regards
KP
Comment #13
Vincent Verheyen commented@krishnair
Very nice debug. Both the issues of
are fixed by your modification in comment #12.
Thanks,
V.
Comment #14
zarabatana commentedI confirm that the fix provided in comment #12 works good.
I think this should be committed as soon as possible.
Best regards
Comment #15
matglas86 commentedPlease try to update to the latest 7.x-4.0-alpha5 to see if the problem is still there.
Comment #16
bbcI'm seeing this with alpha6. The fix in comment #12 seems to have worked nicely.
Comment #17
matglas86 commentedUpdated summary