Title: [Plugin: Posts 2 Posts] Still missing data after 1.4.1
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Still missing data after 1.4.1

 *  Resolved [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/)
 * Hello,
 * After the latest update 1.4.1, the back-end is recovered.
 * But there is strange behavior on the front-end where many fields coming from 
   objects are not rendered anymore.
 * [The template is here :](http://dev2.pointben.net/formation/iphoto-debutant)
 * If you look on the the left side (dark menu) it will open => the menu displays
   an empty list : it counts well the objects … but nothing is displayed.
 * In the center of the page, it displays different objets (image, title, …) but
   no others (video, … ) who are missing.
 * In the array of the connected_item ([that is display above on the page](http://dev2.pointben.net/formation/iphoto-debutant)),
   it looks to a year 2525 …
 *  `YEAR(wp_posts.post_date)='2525'`
 * Frankly I don’t understand why (and where this figure is coming).
 * Does anyone has a clue or a way to investigate on this case?
 * Thank you for your support
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

Viewing 15 replies - 16 through 30 (of 30 total)

[←](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/?output_format=md)
2

 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983100)
 * Right, so it returns a ‘formation’ post.
 * Therefore, only the ‘formations_to_chapitres’ query could return anything.
 * Will try to set it up on my test install.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983101)
 * if you want an access or a dump … don’t hesitate. I could share something through
   dropbox.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983102)
 * Previously, every connexion was sending back something …
 * maybe the way I was structuring the cascade was heretic 🙂
 * If you look here, on an other install WP, the page is full with objects coming
   from the 3 queries
 * [http://dev2.pointben.net/formation/iphoto-debutant](http://dev2.pointben.net/formation/iphoto-debutant)
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983103)
 * I meant the 3 `new WP_Query` calls at the top. They all use the same `get_queried_object()`.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983104)
 * How can I differentiate them?
 * I’ve seen an example with get_queried_object_id()
 * I’m sorry, I’m not a dev and a poor PHP culture 🙂
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983105)
 * You don’t even use the other 2; just remove them.
 * I tried to replicate your setup on WP 3.4.1 and `each_connected()` seems to work
   fine.
 * Add `var_dump( $chapitres->request );` after defining it. This should produce
   the raw SQL query.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983106)
 * Aaah OK, I see what you want to see.
 * I’ve added a
 *     ```
        tag to add more readability.
   
       And you've got 2 levels : request and then the full var
   
       Here the previous URL
   
       The thing I've noted is the YEAR set up to :
   
       YEAR(wp_posts.post_date)='2525'
   
       Here is another URL with the same date published
   
       http://dev2.pointben.net/membres/formation/apercu-2
       ```
   
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983107)
 * You need to upgrade to P2P 1.4.1.
 * And remove `$Lecons` and `$Videos` already. I told you they’re useless.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983108)
 * In fact I’ve downgraded to 1.3.1 because it is worst with 1.4.1
 * If [you look here > on the sidebar in the dark grey area, you still got a list of item but no Title and no links …](http://dev2.pointben.net/membres/formation/apercu-2)
 * Here is[ a simple view with a complete sidebar and the list of items below.](http://dev2.pointben.net/formation/iphoto-debutant)
 * here on the template I’ve removed $Lecons and $Videos but I think that the structure
   of the code for the main template is not accurate.
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983112)
 * Excuse me, but if I understand well (as the $Lecons and $Videos are useless),
   does it mean that it is not possible to handle such template?
 * To display parts of every object connected in this waterfall?
 * training -> chapters -> lessons -> videos
 * How could I build such queries ?
 * Thank you.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983113)
 * No, it means that you only need to call `each_connected()` – it will construct
   a WP_Query instance internally.
 *  [Twansparant](https://wordpress.org/support/users/twansparant/)
 * (@twansparant)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983114)
 * I’m having the same problems as Francois, the back-end is fine but connections
   are missing on the front-end.
 *  Plugin Author [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983116)
 * The main problem in Francois’ case was that each_connected() was outputting wrapped
   post objects, instead of raw post objects. This is fixed in the latest [development version](http://downloads.wordpress.org/plugin/posts-to-posts.zip)(
   1.4.2-alpha2).
 *  Thread Starter [Francois Lamotte](https://wordpress.org/support/users/francoislamotte/)
 * (@francoislamotte)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983117)
 * Thank you very much Scribu for this update.
 *  [seocadiz](https://wordpress.org/support/users/seocadiz/)
 * (@seocadiz)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983146)
 * Hi scribu,
 * I installed the development version and still have the same problem:
 * Here is my code:
 * The function:
 *     ```
       function my_connection_types() {
   
       		p2p_register_connection_type( array(
       			'name' => 'pages_to_pages',
       			'from' => 'page',
       			'to' => 'page',
       			'reciprocal' => true,
       			'sortable' => 'any'
       	) );
       }
       add_action( 'p2p_init', 'my_connection_types' );
       ```
   
 * Printing connected pages:
 *     ```
       $connected = new WP_Query( array(
         'connected_type' => 'pages_to_pages',
         'connected_items' => get_queried_object(),
         'nopaging' => true,
       ) );
   
       // Display connected pages
       if ( $connected->have_posts() ) :
       ?>
       <h3>Related pages:</h3>
       <ul>
       <?php while ( $connected->have_posts() ) : $connected->the_post(); ?>
       	<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
       <?php endwhile; ?>
       </ul>
   
       <?php
       // Prevent weirdness
       wp_reset_postdata();
   
       endif;
       ```
   
 * And i still get the error:
 * Warning: Could not find direction(s). in /public_html/wp-content/plugins/posts-
   to-posts/core/query-post.php on line 16

Viewing 15 replies - 16 through 30 (of 30 total)

[←](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/?output_format=md)
[1](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/?output_format=md)
2

The topic ‘[Plugin: Posts 2 Posts] Still missing data after 1.4.1’ is closed to 
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

 * 30 replies
 * 6 participants
 * Last reply from: [seocadiz](https://wordpress.org/support/users/seocadiz/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-still-missing-data-after-141/page/2/#post-2983146)
 * Status: resolved