I am trying to:
1. display custom fields of a post inside a view loop
2. display a cred edit form inside a view loop
I expected to see:
ad 1: the custom fields of the current post inside the loop
ad 2: a cred form editing the current post inside the loop
Instead, I got:
ad 1: custom fields of the current_page (i.e. [wpv-post-id] displays the title of the post where the view is shown, not the post inside the loop)
ad 2: the message: 'Form type and post type do not match' indicating that the post is trying to edit the current_page post instead of the post inside the loop
Additional info:
If we output the field of the post inside the view loop like this:
[wpv-post-title item="[wpv-post-id]"]
the title of the post in the loop is correctly displayed
If we output the field like this:
[wpv-post-title]
we get the title of the current_page, and not the post in the loop
Moreover:
If we output the cred form inside the view loop like this:
[cred_form form='task-archive']
we get a type mismatch (because the post where the view is inserted is from a different post type)
If we output the cred form inside the view loop like this:
[cred_form form='task-archive' post='wpv-post-id']
we do not get the type mismatch, but still the form is not working correctly because it tries to edit the current_page, not the post in the loop.
This is confirmed by the following:
If we output the cred form inside the view loop like this:
[cred_form form='task-archive' post='wpv-post-id']
and from within the form we output [wpv-post-id] , we see the post id of the current_page, not the post-id of the post inside the loop
This is kind of a big deal, because we make use of views extensively to display both post fields and post forms from inside a loop and this breaks a lot of the functionality of our sites.
Never mind, we are looking into some code outside of Toolset plugins that is probably the cause of this bug...