Closed (fixed)
Project:
Facebook-style Statuses (Microblog)
Version:
6.x-1.x-dev
Component:
Code - Hooks
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
7 Nov 2008 at 18:47 UTC
Updated:
14 Nov 2008 at 20:36 UTC
Details
Type php
Message preg_match() expects parameter 2 to be string, array given in /hsphere/local/home/picture2/pingiz.com/includes/bootstrap.inc on line 737.
Severity error
Comments
Comment #1
icecreamyou commentedWhat version of Drupal are you using? What version of PHP? What kind of SQL? What version of SQL? Parent domain or subdomain? What pages are you having this problem on, and what users encounter this problem?
For starters, don't enable the block for anonymous users.
Comment #2
icecreamyou commentedComment #3
volkiz commenteddrupal 6.x
php5
mysql 5
parent domain
problem encountring on every pages have "facebook status" block
and problem started on when i update this module to 6.x-1.x-dev (2008-11-06) version
Comment #4
icecreamyou commentedI can't duplicate the issue. What are your settings for the module?
And do you have the Advanced Forum module enabled?
Comment #5
akashihi commentedI have same problem with same setup as volkiz has. No Advanced Forum module is installed. The settings are:
Facebook mode - on
Slide effect - on
Status length - 30/192/192
Number of statuses - 5
Misc - 0/0/Nothing
Comment #6
icecreamyou commentedHmm... I can't figure out why this is happening, I can't duplicate the issue, and I can't think of anything else to debug...
It's possible I suppose that the problem has to do with the function names. The name of the form that appears in the facebook status block is facebook_status_update_form, and the name of the function that renders that form is facebook_status_display_form. Drupal has a hook_form, so it may be improperly trying to interpret those two functions using the hook_form structure. I think this could be the issue mainly because the error is appearing in bootstrap, which is when all the functions are loaded.
Which is to say, I've changed the names of those two functions and committed it to CVS. Try the next -dev and see if you still have the problem.
Comment #7
akashihi commentedI've looked into the bootstrap inc and found, that the error is in drupal_validate_utf8, which is called by .... check_plain :) and your module calls check_plain several times. I have spent some time, trying to find the erroneous cal, but didn't found anything, but i didn't checked every call
Comment #8
icecreamyou commentedIf you're right, then the problem is probably either in facebook_status_display_form (now facebook_status_display_b):
...or in facebook_status_update_form (now facebook_status_update):
...but frankly, I don't see a problem, and it may be that there are other issues with your installation that are causing this problem. Certainly check_plain() is not a place I would expect a problem. More confusing to me, though, is that I don't think I changed/added/removed any check_plain() calls in the last -dev, which was when this problem started happening.
Comment #9
icecreamyou commentedUpdate: problem confirmed. Your setups probably have PHP compiled in a way that creates a WSOD on minor errors; I forget what that's called. On my system it just logs the error.
Comment #10
Flying Drupalist commentedHi, does this mean I have to change my theme edits and blocks before I update?
Comment #11
icecreamyou commentedYes... although it was kind of a stupid choice for me to rename those functions since it didn't actually solve anything. Sorry for the hassle.
Comment #12
akashihi commentedI'm using PHP package the from Debian stable
Comment #13
volkiz commentedinstalled dev update and nothings changed
Comment #14
icecreamyou commentedYeah, I didn't really expect it to. Well, I'll go through the changes I made line by line as soon as I can and see if I can isolate the problem.
Comment #15
icecreamyou commentedI think I've figured out the problem.
In the November 6 update, I added a parameter for two forms to take. In 6.x, the first parameter must always be $form_state, but I didn't know that. So when I was trying to pass in a UID, it got overwritten when the form was built, and that left functions further down the line feeling the pain.
I'll try to fix it tonight, if not hopefully I'll get to it tomorrow. Looks like I should have taken a closer look here before even upgrading this module to 6.x - that'll teach me not to rely on coder.module. :-P
Comment #16
icecreamyou commentedFixed! (in the next -dev)
If you're calling facebook_status_display_b, you must now call it with two parameters: $form_state and $uid, in that order. If you don't know FAPI well (or even if you do and you don't have any special requirements), just pass NULL for $form_state.
Most people, of course, will not need to use the API, and the module should "just work."
Comment #17
akashihi commentedI confirm - everything is ok now
Comment #18
wotipka commentedGetting the same error:
preg_match() expects parameter 2 to be string, array given in /var/www/includes/bootstrap.inc on line 737
Currently trying to get dashPlayer installed and running. I cannot give you any more specifics other then:
All items latest as of 11/10/08
Drupal 6
PHP5
Edit: 11/14/08 00:28
I seem to not be getting connectivity between the dashPlayer and Drupal. (The player skin is there but the video never loads.) The error happens when I try to force the player to play. I guess because since it is not connecting to the "server" correctly that something is getting a null value.
SIDE NOTE: The whole nesting issue seems to be one of the most confusing points of Drupal. When you have to add content inside a module. For example /http://somewebsite.com/modules/fancymodule/fancymodule/stuff here. Now do you uncompress the folder and put the contents here or do you uncompress the folder and put the UNCOMPRESSED folder (making the contents one more level down) here. Most of the issues I have seem to come from this. A lot of docs say one thing and the config files are coded a different way. Can someone shed any light on this for us newbies?
Comment #19
icecreamyou commentedwotipka, it seems that your issue is with dashPlayer and has nothing to do with facebook_status. Please open an issue under the correct project.