Home › Toolset Professional Support › [Resolved] Error message Notice: Trying to get property of non-object in /var/www/goldhofer
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
Tagged: Views, Views plugin
This topic contains 7 replies, has 2 voices.
Last updated by jornB 6 years, 3 months ago.
Assisted by: Beda.
Hello,
Error message has started to showing up at every empty page (404 - empty search results):
Notice: Trying to get property of non-object in /var/www/goldhofer.se/public_html/wp-content/plugins/wp-views/application/models/shortcode/post/body.php on line 88
hidden link
hidden link
Security incident detected Your request was blocked. Please try again later (or don't).
That is what I see on the login URL.
Can you let me know how I can A) replicate the issue or/and B) how I log in to your site?
Can you let me know if you styled your 404 pages or archives with Views/Layouts?
Please try again now!
Yes, I have styled the 404 page and archive pages with Views/Layouts.
The issue appears on:
- Search results page only when there is no results!
- Error 404 page.
- "Spare Parts" product category that has no products.
- Other products categories like "Used", "Rental" *ONLY* when filter results has no products (refreshed page results - not ajax results).
The same;
Security incident detected Your request was blocked. Please try again later (or don't).
This happens after I log in.
Are you blocking countries (GEO) or IPs?
I am in Hong Kong, IP varies often.
Along with the details asked here:
https://toolset.com/forums/topic/error-message-notice-trying-to-get-property-of-non-object-in-var-www-goldhofer/#post-1069226, I now enabled a private reply to add a copy of the site if you can not for some reason allow the online log in.
However, please verify that this is happening with Toolset alone, and eventually you can add the information previously asked so I can try to replicate
Hello Beda,
I'm not able to defined the problem with your login!
Anyway, I can send you a copy of the website if you could activate private reply.
I think I've answered your questions:
Yes, I have styled the 404 page and archive pages with Views/Layouts.
The issue appears on:
- Search results page only when there is no results!
- Error 404 page.
- "Spare Parts" product category that has no products.
- Other products categories like "Used", "Rental" *ONLY* when filter results has no products (refreshed page results - not ajax results).
I have tried to:
- deactive/active all the installed plugins.
- stop all the added shortcuts in function.php.
but nothing happens
I activated a private reply, so you can submit a copy of the site.
I will then deploy that locally and hopefully locate the issue - so to either provide a solution or escalate this to the Developers.
You are using a Plugin "Intuitive Custom Post Order".
I am not sure about it, but I would not use it with Toolset Types, other similar Plugins will conflict with it.
Our Plugin and Post Types often require several actions when manipulated and backend AJAX reorder or even post type changers break it.
Anyway, this is just a heads up.
To test the issue you reported I deactivated those non-Toolset Plugins anyway.
I updated Toolset, installed a native (and updated) WordPress Theme (Toolset Starter is deprecated, which we can discuss in another ticket, if you require. You can use it - but it is not developed anymore actively).
I have no error on 404 pages or empty search results.
I reactivated Child Theme and all plugins, and now I see this error:
( ! ) Notice: Trying to get property 'ID' of non-object in .../wp-views/application/models/shortcode/post/body.php on line 88
I activated Toolset Starter (The Parent, original), no change.
The issue here is due to Toolset Starter Theme and Toolset Layouts + Views.
It's due to the "Header and Footer" parent Layout:
hidden link
In there, first row there is a Visual Editor Cell that calls the post body of a given Post:
[wpv-post-body view_template="None" id="359"]
I am not sure how that was inserted, as the id should be item:
[wpv-post-body view_template="None" item="359"]
However that does not solve the issue.
I saw that Post ID 359 is a private page:
hidden link
The post body of that Page is in fact displayed, but it still throws the notice.
I replicated this issue on your install (copy of) with a minimal Layout, and it looks like these issues:
https://toolset.com/errata/loop-items-are-not-shown-if-a-view-is-rendered-thru-a-layout-applied-to-products/
https://toolset.com/errata/content-template-cell-of-another-post-shows-error-and-wrong-data/
But not the exact same.
How to solve it:
- remove the Visual Editor Cells's ShortCode "[wpv-post-body view_template="None" item="359"]" and instead, insert a Content Template Cell.
- Doing so, select to "Display content for" and then select the page you want to use (Network, in your case)
- Then, display thru a new template which an can be edited right when inserting the cell. Just call the post body there:
[wpv-post-body view_template="None"]
That solved the issue on the copy.
The Problem is that Visual Editor Cells, and Post Body ShortCodes, can not always be mixed.
Best is, to use The Content Cell, or a Content Template.
FYI, in case you stumble over this:
https://toolset.com/errata/fully-integrated-themes-layouts-break-password-protection-pages/
Thanks