• non_human

    (@non_human)


    Hi! First of all, thanks for a great plugin, it’s awesome!
    The problem:
    #1. Currently running 1.0.1 version I recently started to get a problem in adding connection meta (it would not save the data). Only half of the fields would be saved. I have custom post types riders and ranking. connection type – riders to rankings, reciprocal. So when I add one connection meta data from riders page to ranking connection, it works. But when I add many riders to a ranking list with connection meta – it saves only some of them. I had a problem with php memory limit in WP and I could increase it only till 48Mb with my client’s hosting. Could that be a problem?
    #2. I thought that upgrade will help so I added names to connection type and upgraded the plugin, but after updating connections all riders to ranking connections were gone.
    I also have riders to classes connection and those work ok, but this exact riders to ranking connections were gone from the db (checked in phpMyAdmin)

    Would really love to upgrade because of all great features in the new version, but had to reverse to 1.0.1 and restore DB from back up.

    Any ideas?

    https://www.ads-software.com/extend/plugins/posts-to-posts/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author scribu

    (@scribu)

    First of all, are you using any of these other plugins?

    Second of all, it would be useful if you shared your p2p_register_connection_type() calls: https://gist.github.com/

    Thread Starter non_human

    (@non_human)

    https://gist.github.com/8627c07691476c6b6a32

    here you can see the riders to classes and riders to ranking connections. first one was ok, but the ranking one disappeared after upgrade (the connected items, not the connection itself).

    no, none of other plugins are used.

    Plugin Author scribu

    (@scribu)

    The connections look fine (you can put both calls in a single function).

    Maybe this will help (after running the migration script):

    https://www.ads-software.com/support/topic/plugin-posts-2-posts-all-existing-connection-gone?replies=15#post-2517920

    Thread Starter non_human

    (@non_human)

    Thanks scribu, I read that thread after I upgraded to 1.1.5
    I found my auto generated connection hash through $my_connection_type->name and found all connected posts in db except the rider_to_ranking connections. So then I used my backed up db on another wp install and added the connection name to the call function before upgrade, all the connections hash names were exactly as I specified, but no entries from rider_to_ranking connections.

    considering I have around 300 connected riders to different ranking lists, it would be nice to keep them and not re-enter again =/

    Plugin Author scribu

    (@scribu)

    So, after you upgrade, they don’t exist in the database anymore or are they just not displayed in the admin UI?

    Thread Starter non_human

    (@non_human)

    they don’t exist in database any more

    Plugin Author scribu

    (@scribu)

    That’s very strange, since the migration script only does UPDATE queries.

    Try deactivating all other plugins and switch to the twentyeleven theme, so that there’s no other custom code running.

    Before updating P2P, remember the number of entries in the wp_p2p table.

    After updating P2P and running the migration script, check the number of entries again. It should be the same.

    Thread Starter non_human

    (@non_human)

    You were right, the connections didn’t disappear after upgrade, but somehow merged with other connections.
    I checked again and I found actually two connection types that “disappeared” from db, and they are rider to ranking and class to event.
    Rider to ranking connection isfrom rider to ranking and reciprocal, same as from class to event. I used to connect riders to ranking from ranking post type. And I mostly connected riders to ranking from ranking page and the same class to event from event post type. Could that be an issue? That the connection type is set as from rider to ranking andfrom class to event but were written to db as from ranking id to rider id and from event id to class id?

    Plugin Author scribu

    (@scribu)

    It doesn’t matter where you create the connection from in the admin; the connection is always created from A to B.

    So, I’m not sure how you got into this situation, but here’s some code that will “flip” the connections:

    https://www.ads-software.com/support/topic/plugin-posts-2-posts-reciprocal-problem

    Thread Starter non_human

    (@non_human)

    ok, I’ll try that. thanks!
    I found by p2p_to and p2p_from fields in db that indeed my rider_to_ranking connections were named class_to_rider and my class_to_event connections — rider_to_event

    Plugin Author scribu

    (@scribu)

    Yeah, well that’s one of the reasons I added an explicit p2p_type column; to avoid these kinds of ambiguities in the future.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Posts 2 Posts] upgrade problem from 1.0.1 to 1.1.5’ is closed to new replies.