Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Welcome pack plugin errors : missing argument


pangloss
Participant

@pangloss

!!!!!


!!!!!!!!!

New Instructions – DO NOT USE THE ABOVE INSTRUCTIONS, USE THESE. I left out a couple of things earlier and changed some other things.

!!!!!


!!!!!!!!!

I was able to correct this problem with some mods to the welcome-pack.php file.

And I must preface this by saying that this fix is a hack. I am really not that familiar with the plugin and don’t know that my changes won’t result in some problem.

Basically, it appeared that none of the following functions were using the $meta value being passed in. So, I removed it. Here is the simple change. For each of these three, around lines 74, 102 and 132, respectively – change them from this:

function dp_welcomepack_welcomemessage( $user_id, $password, $meta )

function dp_welcomepack_defaultfriend( $user_id, $password, $meta )

function dp_welcomepack_defaultgroup( $user_id, $password, $meta )

to this:

function dp_welcomepack_welcomemessage( $user_id, $password )

function dp_welcomepack_defaultfriend( $user_id, $password )

function dp_welcomepack_defaultgroup( $user_id, $password )

NEW!!!: Change the following lines in “dp_welcomepack_onuserandblogregistration” from this:

dp_welcomepack_defaultfriend( $user_id, $password, $meta );

dp_welcomepack_defaultgroup( $user_id, $password, $meta );

dp_welcomepack_welcomemessage( $user_id, $password, $meta );

to this:

if(is_array($user_id)){

$user_id = implode($user_id);

}

dp_welcomepack_defaultfriend( $user_id, $password );

dp_welcomepack_defaultgroup( $user_id, $password );

dp_welcomepack_welcomemessage( $user_id, $password );

That will correct your undefined argument problems and should solve your array problem. Note!!! I am not entirely sure why the user_id value was being converted to an array in the first place, so, make these changes with that in mind. I don’t believe it will be a problem but it is possible that somehow you might get an actual array of more than one value and that would be an issue. One way to check this that I did not add would be to get an array count if it is an array and only set the value if it’s equal to 1.

If for some reason you are experiencing other problems, feel free to message me privately and I can investigate further.

Skip to toolbar