Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I installed and enabled the module version 6.x-2.0-beta4 (using drupal 6.22)
I setup a 404 error redirect at http://localhost/admin/settings/error-reporting
When I got to http://localhost/asdfasdf I get the following error:
Fatal error: Unsupported operand types in /includes/common.inc on line 1592
If i remove the module, the error is gone, and I get redirected to my 404 page.
Comment | File | Size | Author |
---|---|---|---|
#8 | fb_social-init_unsupported_operand_types-1416814-8.patch | 593 bytes | jsagotsky |
#7 | fb_social-init_unsupported_operand_types-1416814-7.patch | 551 bytes | jsagotsky |
Comments
Comment #1
madhattertech CreditAttribution: madhattertech commentedI also get the same issue with 6.x-2.0-beta3
Comment #2
Aress CreditAttribution: Aress commentedI got the same issue with drupal 6.24 and 6.x-2.0-beta4.
Comment #3
webnotwar CreditAttribution: webnotwar commentedCommenting out line 189 in fb_social.module ( $content = drupal_get_title(); , 6.x.2.0-beta4) fixes the problem for me.
Unfortunately, the "og:title" meta-tags doesnt' display the page title, just the site name.
Comment #4
ferdi CreditAttribution: ferdi commentedI looked at this and was not able to find the source of this bug. Will investigate further.
Thanks!
Comment #5
Ionut CreditAttribution: Ionut commentedAny updates on this?
Comment #6
jsagotsky CreditAttribution: jsagotsky commentedThe problem is in fact drupal_get_title. Running this in hook_init causes common.inc to WSOD. The short explanation is that drupal_get_title affects breadcrumb generation and implies that the current path should be part of the breadcrumb trail. When the breadcrumb trail is generated, that page has no title and causes the error.
Counterintuitively it looks like this can be fixed by swapping drupal_get_title out for drupal_set_title, which always returns the title but only sets a title if a new one is provided. drupal_get_title also sets the active title, which is what causes the breadcrumb error.
Patch to follow. This change does avoid the error, but I'm not 100% sure yet that ignoring the make active call in drupal_get_title is okay.
Comment #7
jsagotsky CreditAttribution: jsagotsky commentedHere's the patch I mentioned in comment 6.
Comment #8
jsagotsky CreditAttribution: jsagotsky commentedCommitted that last patch too soon. Turns out it wasn't getting the title correctly after all.
Attached patch will fix it.
Comment #9
WiredEscape CreditAttribution: WiredEscape commentedv6x-2.0-beta4
Confirm that fix works but patch contains an error in line to be replaced.
The code used in module is :
$content = drupal_get_title();
not
$content = drupal_set_title();
as found in patch.
Comment #10
gp.mazzola CreditAttribution: gp.mazzola commentedI have found this thread trying to figure out the issue happening onmy site.
For me the latest patch does not work. (I corrected it according to post #9)
It seems to work a first time, but then it does not work anymore on subsequent pages requests
I tried both witch cache enabled and disabled
Comment #11
myha CreditAttribution: myha commentedPatch in #8 works for 6x-2.0-beta4. Thanks a lot!
Comment #11.0
myha CreditAttribution: myha commentedadded drupal version