Forum Replies Created

Viewing 15 posts - 91 through 105 (of 125 total)
  • Author
    Posts
  • in reply to: post relationships not preserved in upgrade #4820
    mcmaster
    Member

    p.s. saving a copy of the database first and can provide it to you if it might be helpful in diagnosing the problem

    in reply to: post relationships not preserved in upgrade #4819
    mcmaster
    Member

    Breakthrough! I accidentally discovered that when I updated (saved) a page, suddenly the related projects appeared on the page. Likewise, the project page now lists that one page. So I’m going to update all the pages and see if the rest of the data shows up.

    in reply to: post relationships not preserved in upgrade #4818
    mcmaster
    Member

    So the good news is that I can see the post relationships field when editing a page. The bad news is that when I try to retrieve using the legacy code, I get nothing back. Was there a change? Does it now need a field name? Or ??

    Again, this is what I have been using, and what worked until 0.9.9:

    $args = array(
    	'post_type' => 'page', // Set post type you are relating to.
    	'posts_per_page' => -1,
    	'post_has' => $post->ID,
    	'suppress_filters' => false, // This must be set to false
    );
    $list = get_posts( $args );
    in reply to: post relationships not preserved in upgrade #4816
    mcmaster
    Member

    @Kevin, you really need a way to manually trigger updates!

    My first try:
    – removed the add-more files from piklist/parts/meta-boxes, leaving just the post-relate fields
    – replaced plugin files for 0.9.9.5 with 0.9.4.29
    – went into Piklist settings so that it theoretically knew it was running 0.9.4.x
    – replaced files for 0.9.4.29 with 0.9.9.5
    – back to Piklist settings
    – nothing

    2nd try:
    – removed the whole piklist subdirectory from my theme so I could deactivate Piklist
    – deactivated 0.9.9.5
    – replaced plugin files for 0.9.9.5 with 0.9.4.29
    – activated 0.9.4.29
    – deactivated 0.9.4.29
    – replaced files for 0.9.4.29 with 0.9.9.5
    – replaced the piklist subdirectory into my theme
    – activated 0.9.9.5
    – nothing

    3rd try:
    – removed the piklist subdirectory
    – deactivated 0.9.9.5
    – replaced plugin files for 0.9.9.5 with 0.9.4.29
    – replaced the piklist subdirectory into my theme
    – activated 0.9.4.29
    – edited a page with the post-relate fields (they are there)
    – removed the piklist subdirectory
    – deactivated 0.9.4.29
    – replaced files for 0.9.4.29 with 0.9.9.5
    – replaced the piklist subdirectory into my theme
    – activated 0.9.9.5
    – edited a page with the post-relate fields
    – nothing

    That’s not counting the times that I forgot to remove or replace the piklist parts files. 😉

    So I studied the Piklist code. I edited Piklist_Admin::check_update line 719 to always be true, and Piklist_Admin::get_update line 799 be true for version number ‘0.9.9.’ This forced Piklist to offer me the update. For some reason it displayed everything twice, but otherwise seemed to run fine. It did not list the post-relate field in its output report (see image), but I now have the post relationships back.

    Donna

    Attachments:
    You must be logged in to view attached files.
    in reply to: post relationships not preserved in upgrade #4813
    mcmaster
    Member

    Is there a way to run the upgrade script without going back to a previous version of Piklist and then upgrading again?

    Also, I don’t want the add-mores to be re-converted, so I’m thinking the best plan is to temporarily remove those files from Piklist parts folders during the upgrade.

    Thanks,
    Donna

    in reply to: post relationships not preserved in upgrade #4801
    mcmaster
    Member

    I just saw another post https://piklist.com/support/topic/how-are-post-relationships-stored/ which indicates that the post-relate data was stored in a table called wp_piklist_cpt_relate. However, this table wasn’t present in the current DB or in my backups.

    The metabox code, FYI:

    /*
    Title: Related Projects
    Post Type: page
    Description: list of projects related to this page
    */
      
    piklist('field', array(
    	'type' => 'post-relate',
    	'scope' => 'project',
    	'template' => 'field',
    	'field' => 'related_project',
    	'label' => 'Related Projects',
    ));
    

    And the code to retrieve the pages related to a specific project:

    $args = array(
    	'post_type' => 'page', // Set post type you are relating to.
    	'posts_per_page' => -1,
    	'post_has' => $post->ID,
    	'suppress_filters' => false, // This must be set to false
    );
    $list = get_posts( $args );
    
    in reply to: label misplaced in add-more (0.9.9.4) #4772
    mcmaster
    Member

    I tried removing the line:

    	'template' => 'field',
    

    from the group definition, and the results were not better. 😉

    Again, if I’m being clumsy with my field definitions, please let me know!

    Thanks,
    Donna

    Attachments:
    You must be logged in to view attached files.
    in reply to: Resolved Forum Topics Hard to Read #4751
    mcmaster
    Member

    Thanks, Carla, I had the same trouble! 🙂

    in reply to: Critical: Preview while editing metaboxes causes data loss #4725
    mcmaster
    Member

    Never mind, will email you the plugin zip.

    in reply to: Critical: Preview while editing metaboxes causes data loss #4724
    mcmaster
    Member

    I can’t give you access to the live site. I just tested on my dev site, and was able to reproduce with the 2015 theme and all plugins disabled except for Piklist and a stripped down version of my Piklist add-on plugin.

    I’m attaching a zip of my plugin. I can also provide you with a database export and/or set up a test account on my server.

    in reply to: Critical: Preview while editing metaboxes causes data loss #4721
    mcmaster
    Member

    oops, forgot to mention this is 0.9.9.4

    in reply to: single quote marks are backslashed [0.9.9.4] #4708
    mcmaster
    Member

    happening with double-quotes in text fields as well … just realized it’s adding slashes every time I save *urk*

    Attachments:
    You must be logged in to view attached files.
    in reply to: single quote marks are backslashed [0.9.9.4] #4707
    mcmaster
    Member

    p.s. adding stripslashes to my processing is a workaround:

    $highlights = wptexturize( wpautop( stripslashes( $data['newsletter_highlights'] ) ) );
    
    in reply to: Editor with serialize #4699
    mcmaster
    Member

    @ndbe, what version of Piklist are you using? I think this may be a bug that is fixed in the current Beta, 0.9.9.4.

    in reply to: how to use editor_css? #4668
    mcmaster
    Member

    Ah, I see. I’ll play with that. Thanks!

Viewing 15 posts - 91 through 105 (of 125 total)