• dmclark

    (@dmclark)


    I have a wp site that goes all the way back to 1.2 and at that time I really was intimate with the codebase..

    On category pages ( like https://www.ldresources.org/?cat=26 I created a hack to tie lick categories with post categories. by putting
    <h3><?php echo get_catname($_GET[‘cat’]); ?> Links</h3>

      <?php get_linksbyname(get_catname($_GET[‘cat’]),’

    • ‘,’
    • ‘,”,”,’name’);
      in the category template.

      I’m trying to upgrade to 2.1 to do away with that hack.

      My problem is that lines 518-543 of upgrade-functions.php does not seem to support this type of equivalency.

      can anyone offer different logic for the upgrade?

      thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Samuel B

    (@samboll)

    https://codex.www.ads-software.com/Template_Tags#Link_tags
    Those tags were deprecated in 2.1.
    You can see the alternatives at the link.

    Thread Starter dmclark

    (@dmclark)

    please read my question:

    My problem is that lines 518-543 of upgrade-functions.php does not seem to support this type of equivalency.

    ie — getting the upgrade to migrate the links to the post cats

    Thread Starter dmclark

    (@dmclark)

    What is unclear in my nquestionand?

    vkaryl

    (@vkaryl)

    The problem is that what you’ve done is not supported any more – and it’s probably not going to be supported in future either.

    You might be able to seriously hack core to accomplish what you want to do, but the next time you upgrade you’ll run into the problem again.

    Thread Starter dmclark

    (@dmclark)

    I am not asking for the tags to be supported — I am asking for the links table to be upgraded correctly, right now I get WordPress database error: [Duplicate entry ‘LD Support Professionals’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘LD Support Professionals’, ‘ld-support-professionals’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘LD Support Organizations’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘LD Support Organizations’, ‘ld-support-organizations’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Events and Conferences’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Events and Conferences’, ‘events-and-conferences’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Books and Videos’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Books and Videos’, ‘books-and-videos’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Legal Resources’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Legal Resources’, ‘legal-resources’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Electronic Text Collection’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Electronic Text Collection’, ‘electronic-text-collection’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Camps and Residential’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Camps and Residential’, ‘camps-and-residential’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Adult Literacy and ESL’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Adult Literacy and ESL’, ‘adult-literacy-and-esl’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Reading, Writing, and Math’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Reading, Writing, and Math’, ‘reading-writing-and-math’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Computers and Software’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Computers and Software’, ‘computers-and-software’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Education Issues and Ideas’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Education Issues and Ideas’, ‘education-issues-and-ideas’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Personal Stories’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Personal Stories’, ‘personal-stories’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Social Issues and Ideas’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Social Issues and Ideas’, ‘social-issues-and-ideas’, ”, ‘0’, ‘0’, ‘0’)

    WordPress database error: [Duplicate entry ‘Shapiro Looks at K-12 Schools’ for key 2]
    INSERT INTO wp_categories (cat_ID, cat_name, category_nicename, category_description, category_parent, links_private, posts_private) VALUES (‘0’, ‘Shapiro Looks at K-12 Schools’, ‘shapiro-looks-at-k-12-schools’, ”, ‘0’, ‘0’, ‘0’)

    vkaryl

    (@vkaryl)

    If you’re upgrading to 2.1+, the whole links setup is completely different. So it’s not supported any more.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    You’re not going to be able to upgrade with a non-standard system. Change your links cats to not have all those same names as the post cats. Then upgrade.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unique upgrade situation with links’ is closed to new replies.