Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] types_render_field Notice: Trying to get property of non-object in ../wp-incl

$
0
0

Dear Ben,

I found the problem. In Types, when you run a types_render_field, it will try to establish the post_id of currently edited post via get_the_ID(). But, as you may know, a post doesn't have an ID until it gets saved into the database, at least as a draft. If you check, this notice doesn't appear once you save the Venue as a draft.

It's not an error, though, so silencing it with @ is one of the options. I would suggest you to change the functionality a little to not to display any fields before the post ID is available. It's actually not a Toolset thing, it's related to how WordPress works, so we can't create a workaround for this.

I'll talk to our developers and suggest a bit of code to have it silenced in the future.

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Paweł


Viewing all articles
Browse latest Browse all 20145

Trending Articles