Hot answers tagged

10

The answer is apparently YES, I should worry. After some research, I've found that the warning seems to be related to misconfigurations on the server that WordPress is hosted on (ie. a problem with my server, not WordPress). Common misconfigurations: Server doesn't have DNS, and so it can't figure out who "example.com" is, even though it is itself. Server ...


7

Lead developer Nacin answers this one: Hello plugin or theme author! You possibly found this post after searching the Internet for the error above: “PHP Warning: Missing argument 2 for wpdb::prepare().” So, this is a new warning in 3.5. No sites are broken, everything is fine as before. But, this is indeed something you need to look at, ...


4

it sounds like even though its a fresh install of WP 3.1.2 that you are also using an existing theme that is using a deprecated function (you havent said so but im presuming), if so paste this into your themes functions.php file (if your theme doesnt have one just create one and save it in your themes root folder).. if(function_exists('add_theme_support'))...


4

Ran into the same issue. @Patriek is correct. The 'taxonomies' argument must be an array, hence the plural. E.g. $args = array( 'taxonomies' => array( 'myTaxonomy' ) ); This corrects the error. I only noticed this when moving a site to another server which leads me to think the register_post_type() function requires some php settings not enabled on ...


4

First of all post field of WP_Query is current post ID and not post object. But I don't think you should use it before calling the_post() method. Normally you should do it in this way: $args = ... $hometeams = new WP_Query( $args ); $teamishome = $hometeams->have_posts(); while ( $hometeams->have_posts() ) { $hometeams->the_post(); $scorehome =...


3

I'm not sure exactly what's happening, but I can guess based on a few context clues. That particular function is parse_tax_query. It appears to be checking if the taxonomy is hierarchical, I assume it's expecting a string that could possibly be a parent/child path of terms, so it uses basename to get the actual term queried- the next line is $term = $q[$t-&...


3

function my_admin_notice(){ global $pagenow; if ( $pagenow == 'post-new.php' || $pagenow == 'post.php') { echo '<div class="error"> <p>This notice only appears on the add and edit post & page.</p> </div>'; } } add_action('admin_notices', 'my_admin_notice'); http://codex.wordpress.org/...


3

The Health Check plugin is triggering the first error. Is this when you're running 2.7? get_transient() was only introduced in 2.8, which would explain it's absence. The second failure is merely a failed HTTP request. This can happen every now and then (mainly due to timeouts). It shouldn't interrupt the normal functioning of WordPress (the HTTP request was ...


3

I'm pretty sure that you ARE incorrect. Let's taka a closer look at this code you mentioned in your question. In first line it sets $where variable: $where = 'WHERE ID IN (' . substr(str_repeat('%d,', count($my_options['acf_posts'])), 0, -1) . ')'; So what this line really does is: get the number of some options (let's call it 'N') repeats %d ...


2

There are two separate post meta values related to this behavior: _edit_lock - holds timestamp when post was last locked; _edit_last - hold ID of user who last edited post. Most likely these somehow got out of sync - lock was triggered recently, but user wasn't properly updated. Hard to guess why from information you provided.


2

The "Comments" column is not a default/core column in the "Posts" page. Perhaps it is being generated by your Disqus Plugin? Try temporarily disabling the Disqus Plugin, and see if the PHP notices go away. EDIT: actually, it is a default column. But I still suspect Disqus is causing the PHP warning.


2

Wherever you're using _x('lorem'), use _x('lorem', 'models'); instead. Models is actually supposed to be a context, but I don't know your context, hence using models. Try this.


2

You have to use just $current_role variable instead of $current_role[0], because call get_user_meta( $author->ID, 'wp_capabilities' ); will return you array with roles as keys. <?php add_action( 'save_post', 'update_roles' ); function update_roles( $post_id ) { if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) ...


2

I would say if the plugin author hasn't responded to support in a year that you should dump the plugin causing the issue and find something else. You're bound to run into more problems in the future. And, yes, s_ha_dum is right that it probably has something to do with the permissions on those files on your server.


2

My assumption would be that your args->taxonomy is empty, invalid or non-existent. without more code its hard to say why. Did you upload all the code from your localhost to the production server. Also sometimes this happens because the taxonomy is created after the register_post_type, but then the localhost code would give the same error. I usually call ...


1

If you var_dump($hometeams); you will see that $hometeams->post is set to the first post in the query results even before $hometeams->the_post runs. WP_Query initializes it automatically if you have posts in the result set. The "Undefined Property" warning occurs when your result set is empty, and thus $hometeams->post can't be set/initialized. ...


1

You can do it with foreach also $args = ... $hometeams = new WP_Query( $args ); foreach($hometeams->posts as $key => $post){ echo get_post_meta($post->ID, 'report_homescore', true); }


1

I found a soloution and what causes it. It was not really the delimiter that was the problem it was becasue a user made duplicate posts. Solution: Replace $notify_message .= preg_replace('#[\s]+#', ' ',sprintf( get_comment_meta($comment->comment_ID, 'title',1))) .' skrev:'. "\r\n" . $comment->comment_content . "\r\n\r\n"; With $...


1

You shouldn't be echoing anything directly from your functions.php. Doing so will prevent redirects. Remove line 226 and you should be good to go. You might want to replace that whole remove_admin_bar with something better coded (or a plugin even).


1

The issue is that the files cannot be written to by the web/php process due to permissions. This is: Good! Those files can't be updated with malware and other nasty surprises Bad! The updater cant update them either So, I'd advise you do the following: Follow these chmod settings religiously What is true chmod for WordPress? Never use the auto-updater ...


1

It is probably because of either different versions of PHP or different configuration for the Error logging. Assuming you have same environment (cart status, blog status, logged in user status etc) To overcome this, Please initialize $totals with empty array in the start of the function. And, If you want error to show up for localhost set WP_DEBUG ...


1

I ran into this problem using the Captcha plug-in in conjunction with the Business Directory plug-in on Weaver II theme. My solution, as rough as it is, was to require users to register and be logged in to comment. That seems to eliminate the error without having to edit the programming.


1

It's always best to start with the WordPress support forum, or the plugin author's plugin page, with a support question. If you had mentioned on my plugin support page that the theme being used was Thesis I would have been able to answer your question sooner, rather than stumbling upon your more detailed question here. Go back and read the plugin page ...


1

Given the error message: Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'tl_spam_free_wordpress_comments_form' was given in /home/euanmitc/public_html/wp-includes/plugin.php on line 403 The error is being generated by whatever Plugin defines this function: ...


1

It seems you have a plug-in or theme activated which is trying to hook a function onto the admin_init hook, but the the function name they've given is not valid. Usually because the function doesn't exist, and potentially because they've put a space in the callback name. Try deactivating your plug-ins/ themes one by one to identify which one it is. Then you'...


1

I'm trying to get this into a few places where the search on this ranks. Based on the piece of code the OP has posted, he is working through the Lynda.com tutorial on custom post types. I've done that one and it does have a glitch in the latest version of WordPress but it's not WP's fault. If subsequent help seekers find this post, they need to wait for ...


1

WP_DEBUG has no impact on PHP error output. In addition to error_reporting setting, set display_errors=0 in your php.ini file. It's enabled by default for development. But you'll want it off on production servers.


1

Try to disable/suppress all error warnings/notices in your wp-config.php (on top). Anyway: Errors are nothing bad. They give you a chance to fix your code.


1

Probably get_the_tags() is returning an empty array. Try changing the function to: $my_tags = get_the_tags(); if ($my_tags){ foreach($my_tags as $tag) { $tags[] = $tag->name; } }


1

In addition to Martin's answer: the ?doing-cron error message is probably due to having ALTERNATE_CRON set to true in wp-config.php.



Only top voted, non community-wiki answers of a minimum length are eligible