Wordpress and FeedBurner Error - wordpress

I used to use FeedSmith FeedBurner Plugin for my wordpress. Today, suddenly, my feeds are giving following errors under each Post Title. I recently upgrade to WP 3.0.1 but has been a week.
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /home/name/wordpress/wp-includes/plugin.php on line 166
I deactivated the plugin and install new plugin "FD Feedburner Plugin" and try again but still no luck. The error still persist even on FeedBurner Page.
Any idea please?

Hopefully you have this fixed already. But I'd like to throw some thoughts on this since it remains unanswered. It appears that 50 people have come here since you posted 7 months ago so maybe I can help someone looking to resolve this or a similar problem. My answer is not specific to FeedBurner or even Wordpress.
The call_user_func_array function takes a string or an array as the first parameter and this parameter determines what function/method call will be made. In the case that the first parameter is an array then the method name should actually be the second element of the array and the first element should be the class name that contains the method.
For example:
call_user_func_array(array($class_name, $method_name), $params)
Because your error is saying that "'Array' was given" I can only assume that the first parameter passed to the function is either an empty array, the first parameter is an array with the first element being an empty array, or somewhere earlier in the code the class or function name was converted to a string as an array.
The same error message can result if the first function parameter is an empty array
Both of the following BAD examples will give the "'Array' was given" error:
call_user_func_array(array(), $params);
call_user_func_array(array(array(), 'method_name'), $params);
So if nothing else, you know that first parameter in the call_user_func_array function call is not what it needs to be.
Hope it helps!

Related

WP API Ignoring parameters

I have a function that loops through my products and creates some json files. Recently this function stopped working correctly.
I tracked it down to the fact the call to the WP API is ignoring the per_page parameter and always grabbing just the first 10.
$response = wp_remote_get($api_url . '/wp-json/wp/v2/products?per_page=50');
I have tried multiple parameters, like adding an offset, nothing works. It grabs the first 10 and that is it.
Has something changed? I tried Googling and I don't find anything relevant. The API documentation says this should work.
If I just put that url with the request in the browser address bar I get the 50.

Error messages: result.rejectvalue 3rd argument

in the following code what is the point of the third argument to rejectValue ?
errors.rejectValue("descriptions", "second_lang_desc_required", new String[] { secondLang.getCode() }, null );
I have this in the message value : Description in second language of application required {0} but this is exactly waht I see in the JSP, no replacement
According to Spring doc the purpose of the third argument is to provide a string array of arguments for replacing vars in messages.
In other words and telling from your code example its exactly what you expected it to be.
I guess you already checked if secondLang.getCode() is different from null. If so please have a look at whether or not you are using the latest release of org.springframework.
It is working in 4.2.4 but I remember having had to use a workaround before switching to 4.2.4 (Yes, of course - a clever guy would check change history and would 'know' instead of assuming, but I never claimed to be one, did I?)

what is the real use of __return_empty_array in wordpress and when should we use it?

As I have started learning wordpress plugin developement recently but i can't understand the function __return_empty_array. It returns an array but when should we really use it.
__return_empty_array returns an empty array. It is ued to return empty array to filters. For example consider the case of turning off the link of the authors page. You can add the following code to functions.php to get it done.
add_filter ('author_rewrite_rules', '__return_empty_array');
In this case an empty array is returned and __return_empty_array is used for it. Hope you get me.

Symfony2 passed argument is null

I'm building a CRM system and I faced a weird problem I'm unable to solve. When I try to create a new CustomerCase entity, I want to assign a CaseState entity for it, so this is what I do in the createAction of CustomerCaseController.php:
$caseStateId = $request->request->get('caseState_id');
$caseState = $this->getDoctrine()->getManager()->getRepository('HSWAshaBundle:CaseState')->findOneById($caseStateId);
$entity = new CustomerCase();
$entity->setCaseState($caseState);
...... etc.....
Everything works just fine until the setCaseState method. After running setCaseState, I get the following error:
Catchable Fatal Error: Argument 1 passed to HSW\AshaBundle\Entity\CustomerCase::setCaseState() must be an instance of HSW\AshaBundle\Entity\CaseState, null given, called in /home/webuser/Symfony/vendor/symfony/symfony/src/Symfony/Component/Form/Util/PropertyPath.php on line 538 and defined in /home/webuser/Symfony/src/HSW/AshaBundle/Entity/CustomerCase.php line 843
The weird part is that $caseState really is a CaseState object (because for example $caseState->getName() works and gives me the correct name for the selected CaseState). For some mind blowing reason it just turns null when I use the setCaseState method. If I do $entity->setCaseState($customerStateObject->getId()), I get the same error message, but this time null changes to integer.
The CustomerCase has a manyToOne relationship with CaseState.
This works just fine if I use the formBuilder's add() method and skip all this manual work, but since I'm using a very specific auto-populating jQuery dropdown for selecting the CaseState from a nested tree structure, I had to manually add the dropdown and read it with $request->request->get().
I've been fighting with this part for almost three days now and would greatly appreciate every help I can get with this!
Finally I got it to work! The reason was $request was missing some parameters because the twig template was missing form_rest(form). After adding that, everything started to work. Thank you!

PHP Warning/Error on Wordpress Site

I'm getting this warning message on a Wordpress I have just setup:
http://wptest.paddingtonterraces.com.au/
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'gllr_add_script' was given in /home/paddingt/public_html/wptest/wp-includes/plugin.php on line 403
Anyone know how to sort this one out?
Deactive your plugins and theme and activate them one by one so you will find out which component causes the problem or which plugin does the function comes from.
It's looking for a function named gllr_add_script... does that function exist?

Resources