• Hi,

    I have found that when I update to the latest version, some of the libraries work fine when I re-set the cats, but some were still coming up blank.

    On checking the Link Cats I saw that some of the cats had 0 links, and those cats seemed to belong to 2 libraries. The total number of links in the updated version was 222, but in the old version was 435, so it seems I am loosing over half the links.

    I did the Re-import to see if that would fix it, but the page did kept on returning a 404 error with this URL ../wp-admin/edit.php?page=link-library-general-options&post_type=link_library_links&ll60reupdate=1 and when I checked with the links, there now were only 175.

    So I re-installed the old version.

    I am wondering if I could have the SQL to run through phpmyadmin that does that update, as that may be why they are all not coming over? Unless you have a better idea.

    Thank you for your time.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Yannick Lefebvre

    (@jackdewey)

    All of the code for the update procedure is found in the file called link-library-update-60.phpT the query that retrieves all links is:

    SELECT distinct l.link_id as import_link_id, l.link_name, l.link_url, l.link_rss, l.link_description, l.link_notes, GROUP_CONCAT( t.name ) as cat_name, l.link_visible, le.link_second_url, le.link_telephone, le.link_email, le.link_reciprocal, l.link_image, le.link_textfield, le.link_no_follow, l.link_rating, l.link_target, l.link_updated, le.link_visits, le.link_submitter, le.link_submitter_name, le.link_submitter_email, le.link_addl_rel, le.link_featured, le.link_manual_updated, l.link_owner
    FROM wp_terms t
    LEFT JOIN wp_term_taxonomy tt ON (t.term_id = tt.term_id)
    LEFT JOIN wp_term_relationships tr ON (tt.term_taxonomy_id = tr.term_taxonomy_id)
    LEFT JOIN wp_links l ON (tr.object_id = l.link_id)
    LEFT JOIN wp_links_extrainfo le ON (l.link_id = le.link_id)
    WHERE tt.taxonomy = ‘link_category’
    GROUP BY l.link_id

    Of course, wp_ gets replaced by the proper table prefix. When links are found, it creates new custom post type records for each link.

    If you run this query on your site, do you get all 435 links?

    If the import mechanism is failing due to having too many links, I have coded a manual bypass mechanism to continue the import. You can reach it by going to:
    /wp-admin/edit.php?post_type=link_library_links&page=link-library-general-options&continue60update=1

    The last part of that URL tells the plugin to continue migrating links, without deleting the ones that have been migrated so far.

    Thread Starter ahau

    (@ahau)

    Thank you for that.

    I upgraded to the latest version and it only imported 175 links this time.

    I ran the /wp-admin/edit.php?post_type=link_library_links&page=link-library-general-options&continue60update=1 and it went to the login page

    I checked the link in Link Library and the total was still 175

    I ran the sql and it did 429 rows.
    I checked the link in Link Library and the total was still 175

    I went to the reset button and ran that then checked the link – it shows a 404 again
    I checked the link in Link Library and the total was now 221

    I did the reset again and this time got 247

    I did
    wp-admin/edit.php?page=link-library-general-options&post_type=link_library_links&ll60reupdate=1 and got 206

    I did /wp-admin/edit.php?post_type=link_library_links&page=link-library-general-options&continue60update=1 and it went to the log in page again and the link count didn’t change

    Once more I ran the sql – it still found 429 rows but the link library total links was still 206.

    So I reverted back again to the old version as that works.

    I think if I could get the manual URL to work instead of just going to the login page – it doesn’t even think about it before going there – that may solve it – well I hope so!

    Thank you for your time ??

    Plugin Author Yannick Lefebvre

    (@jackdewey)

    Sorry for the long time before responding. You can actually put the continue60update flag on any admin URL and it will go through and continue importing links.

    This means that you could just add it to the end of your dashboard URL:

    https://one.wordpress.test/wp-admin/index.php?continue60update=1

    I checked that accessing this address calls the update routine to continue importing links from what it left off.

    Strangely, I am not getting logged off when I add that parameter anywhere, but please let me know if this allows you to complete the import of links into the new version.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Loosing links when upgrading’ is closed to new replies.