Skip Navigation

[Resolved] post type mismatch issue – form in view on single post

This support ticket is created 2 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 4 replies, has 2 voices.

Last updated by svenA-3 2 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#2302877

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?
hidden link

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

#2302953

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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?

#2303055

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]
#2303139

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

#2303141

My issue is resolved now. Thank you!