#10461 closed defect (bug) (worksforme)
Multiple php notices from dashboard
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.9 |
Component: | Warnings/Notices | Keywords: | |
Focuses: | Cc: |
Description
A number of php notices prvent loading of the dashboard on IIS platforms, when wp-debug is in effect. (rev 11731)
The messages are -
PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\post-template.php on line 109 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\post-template.php on line 120 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\capabilities.php on line 821 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\capabilities.php on line 825 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\capabilities.php on line 828 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\capabilities.php on line 839 PHP Notice: Trying to get property of non-object in E:\webpage\svn\trunk\wp-includes\capabilities.php on line 841
This is from IIS 7 and php 5.2.8. I do not see the warnings on my apache test platform running the same version.
Change History (9)
#3
@
14 years ago
- Resolution worksforme deleted
- Status changed from closed to reopened
- Version changed from 2.9 to 3.1
This is happening for me - just not on IIS.
I'm running standard LAMP on the latest trunk.
Just viewing the dashboard with no plugins activated:
Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 918 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 919 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922 Notice: Trying to get property of non-object in /Users/grok/Projects/Local Development/wordpress/trunk/wp-includes/capabilities.php on line 922
It's not recognizing "$post_type->cap" as valid.
And...here's why - I added this (/wp-includes/capabilities.php):
918 echo "POST TYPE: Y U NO OBJECT?\n"; 919 var_dump($post_type);
And got:
POST TYPE: Y U NO OBJECT? NULL
So in this context...the post type is null and the code was not expecting that.
#4
@
14 years ago
Opening the actual $post object:
stdClass Object ( [ID] => 60 [post_author] => 1 [post_date] => 2011-01-28 19:46:23 [post_date_gmt] => 2011-01-28 19:46:23 [post_content] => CONTENT! [post_title] => I have it all! [post_excerpt] => [post_status] => publish [comment_status] => open [ping_status] => open [post_password] => [post_name] => i-have-it-all [to_ping] => [pinged] => [post_modified] => 2011-01-28 19:46:28 [post_modified_gmt] => 2011-01-28 19:46:28 [post_content_filtered] => [post_parent] => 0 [guid] => http://dev.wordpress.local/?post_type=staff_listing&p=60 [menu_order] => 0 [post_type] => staff_listing [post_mime_type] => [comment_count] => 6 [ancestors] => Array ( ) [filter] => raw )
I think the problem might be custom post types or custom taxonomies...
So my custom post type in another plugin is creating: "?post_type=staff_listing".
And this post does show "[post_type] => staff_listing". BUT the plugin that had created these comments...is de-activated.
Activating the plugin resolves this issue.
Sooo whats a viable solution? Telling a developer to clean up after the plugin (removing content just because of de-activation), OR having wordpress not pull data (e.g. comments) that are assigned to other data (e.g. post types) that don't exist?
Old Code: Give me all comments.
New Code: Give me all comments that are tied to existing objects.
#5
follow-up:
↓ 6
@
14 years ago
- Resolution set to worksforme
- Status changed from reopened to closed
- Version changed from 3.1 to 2.9
sterlo, please open a separate ticket with a new description.
#6
in reply to:
↑ 5
;
follow-up:
↓ 8
@
14 years ago
Replying to ocean90:
sterlo, please open a separate ticket with a new description.
Will do, but: Why?
Why repeat ourselves?
#7
@
14 years ago
sterlo, reporter had problems with IIS, you not and reporter get warnings from post-template.php, you not.
=> Two problems, two tickets.
#8
in reply to:
↑ 6
;
follow-up:
↓ 9
@
14 years ago
Replying to sterlo:
Replying to ocean90:
sterlo, please open a separate ticket with a new description.
Will do,
Please leave a short note with the number of the new ticket in this ticket.
but: Why?
To keep different things apart from each other. That will help to get things fixed faster as they are easier to locate.
Why repeat ourselves?
That's not a repetition. This ticket system is used to get some workflow on an issue. Even if the same issue occurs in another version and or point in time and a previous one has been already fixed, a new issue would be created. There is enough space on the servers that can deal easily with some duplicate content.
And you still can link one ticket to another.
7 months ago, this would have been 2.9 alpha. Please re-open if you are still experiencing this problem.