Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: non-object notice #25

Open
JustinSainton opened this issue Nov 11, 2019 · 0 comments
Open

Bug: non-object notice #25

JustinSainton opened this issue Nov 11, 2019 · 0 comments

Comments

@JustinSainton
Copy link
Member

WordPress 5.2.2
Favorites 2.3.1

Thanks for a handy plugin and any help you can provide 🙂

I’m using Favorites on a custom post type lubricant – that’s working fine.

I am NOT using Favorites for Post.

Even so, I am getting this error in a custom WP_Query of blog posts

Notice: Trying to get property of non-object in /www/wp-content/plugins/favorites/app/Entities/Post/PostHooks.php on line 43

-- Limited to Post cards - not affecting the Post itself or other non-favorite templates.
-- Limited to cards in WP_QUERY - not affecting standard loops like search.
-- Affecting some but not all cards in query.
-- Affecting all new posts.
-- Checked plugin settings - on the CPT is enabled.
-- No JS errors in console.

When I view the list of user favorites, this is in the div attributes:

posttypes="post,page,attachment,lubricant,offer"

If this should match plugin settings, then only lubricant should be there.

CARDS WITH POBLEM - custom WP_Query - slicksexy | slicksexy

http://staging.jazzy-mice.flywheelsites.com/blog/

SAME CARDS NO PROBLEM - search results

http://staging.jazzy-mice.flywheelsites.com/?s=aloe

@JustinSainton JustinSainton changed the title Bug Bug: non-object notice Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant