Tell us what you are trying to do?
I placed a well running child post type view on its parent post type's single post. I need an edit form in that view of the same child post type the view is looping thru.
Is there any documentation that you are following?
nope
What is the link to your site?
enlace oculto
I am aware that a form that doesn't match a single post's post type won't work when placed directly on that single post. But within a view of a related child post type - that per se works and loops thru all filtered child posts error free - I expect the form to reference the view's post type instead of mismatching around with the parent post's post type.
Any ideas?
regards,
Sven
Hi Sven
How are you adding the edit form?
Have you inserted the form directly in the output of the child post View? And the form is set to edit posts of that same type?
Because in that scenario, where the edit form is editing the "current" post, and the current post is determined by the View where the form is added, they would be of the same type.
So it sounds like you are doing something different?
Hi Nigel,
it's exactly the positive scenario that you've described. There's two forms for that post type in it (one to set the post's stage like 'to be done' or 'accomplished') and another one in a different layout position for comments). The weird thing is: the former works, the latter responds with mismatch error. Both are set to 'edit' and to the matching post type.
The view looks like this:
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<div class="container wpv-loop js-wpv-loop">
<wpv-loop wrap="1" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-md-12">
<div>
<table class="termintable">
<tr>
<td width="250px">TERMIN: [types field='startdate' style='text' format='d.m.Y H:i'][/types]</td>
<td>[types field='topic'][/types]</td>
<td>[cred-delete-post type='button' action='trash' onsuccess='self']Löschen[/cred-delete-post]</td><td>
[cred_form form='closetermin']
</td>
</tr>
<div class="panel-group" id="accordion">
<tr bgcolor="#FFFF00">
<td colspan=4 style="background: white;">VORLAGEN:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="vorl" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
</div>
<tr>
<td colspan=4 style="background: white;">TERMINORGANISATION:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="beschid" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
<tr>
<td colspan=4 style="background: white;">DOKUMENTE:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="befid" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
<tr>
<td colspan=4 style="background: white;">INTERNE NOTIZEN:<br>
[cred_form form='edittermin']
<br></td>
</tr>
</table>
</div>
</div>
</div>
<div>
[wpv-item index=other]
<div class="row ">
<div class="col-md-12">
<div>
<table class="termintable">
<tr>
<td width="250px">TERMIN: [types field='startdate' style='text' format='d.m.Y H:i'][/types]</td>
<td>[types field='topic'][/types]</td>
<td>[cred-delete-post type='button' action='trash' onsuccess='self']Löschen[/cred-delete-post]</td><td>
[cred_form form='closetermin']
</td>
</tr>
<div class="panel-group" id="accordion">
<tr bgcolor="#FFFF00">
<td colspan=4 style="background: white;">VORLAGEN:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="vorl" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
</div>
<tr>
<td colspan=4 style="background: white;">TERMINORGANISATION:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="beschid" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
<tr>
<td colspan=4 style="background: white;">DOKUMENTE:<br>[terminfile date="[types field='startdate' style='text' format='d.m.Y'][/types]" mirror="[wpv-post-field name='wpcf-mirror_id' item='@karteikopf-termin.parent']" source="befid" topic="[types field='topic'][/types]" mydateID="[wpv-post-id]"]</td>
</tr>
<tr>
<td colspan=4 style="background: white;">INTERNE NOTIZEN:<br>
[cred_form form='edittermin']
</td>
</tr>
</table>
</div>
</div>
</div>
<div>
[wpv-item index=pad]
<div class="col-md-12"></div>
[wpv-item index=pad-last]
<div class="col-md-12"></div>
</div>
</div>
</wpv-loop>
</div>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
<p align="center"><strong>[wpml-string context="wpv-views"]Keine offenen Termine[/wpml-string]</strong></p>
[/wpv-no-items-found]
[wpv-layout-end]
OK, got it.
It was a filter setting issue, that wasn't obvious when looking at the views settings.
Ticket can be closed. Thanks for staying with me.
regards,
Sven
My issue is resolved now. Thank you!