Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/LatinFinance Migrator pt2 #298

Open
wants to merge 30 commits into
base: trunk
Choose a base branch
from
Open

Add/LatinFinance Migrator pt2 #298

wants to merge 30 commits into from

Commits on May 16, 2023

  1. Initial version

    iuravic committed May 16, 2023
    Configuration menu
    Copy the full SHA
    055619e View commit details
    Browse the repository at this point in the history
  2. Add Latin Finance wpcli arguments for Yoast primary category command

    This updated wp cli command for setting primary categories will now
    accept arguments for posts-per-batch and batches.
    
    Posts per batch is essentially WP_Query::posts_per_page. Setting a
    low number here will save sql query memory space.
    
    Batches arugment will set the number of WP_Query(s) that will run.
    The default of -1 will continuously run queries until all posts
    have been updated with Yoast primary category.
    
    This command can be run multiple times as it will only process new
    rows that have yet to be processed.
    ronchambers committed May 16, 2023
    Configuration menu
    Copy the full SHA
    6eee35a View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. Add Latin Finance wpcli command for CoAuthors Plus from postmeta

    CoAuthors will be added to posts that contain the postmeta value
    'newspack_lf_authors' and do not already have CoAuthors set.
    
    This command can be run multiple times as it will only process new
    rows that have yet to be processed.
    
    Command:
    wp newspack-content-migrator latinfinance-set-coauthors-plus
    
    Arugments:
    
    --posts-per-batch is essentially WP_Query::posts_per_page. Setting a
    low number here will save sql query memory space.
    
    --batches will set the number of WP_Query(s) that will run.
    The default of -1 will continuously run queries until all posts
    have been updated.
    ronchambers committed May 18, 2023
    Configuration menu
    Copy the full SHA
    3e107b6 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Add Latin Finance check old site redirects using wpcli command

    Code will check all postmeta 'newspack_lf_url' url values using
    wp function url_to_postid to see if a correct post was found else
    we need to add a redirect for the Redirection plugin.  Other checks
    are done too.
    
    WP CLI command:
    wp newspack-content-migrator latinfinance-check-redirects
    
    Output:
    A report will be printed to the scren as the checks are run.  And
    two CSVs will be exported to WP_CONTENT_DIR path that need to be
    upload to Redirection plugin.
    File 1) Existing redirects from the old site.
    File 2) New redirects that are needed for WordPress.
    ronchambers committed May 22, 2023
    Configuration menu
    Copy the full SHA
    3c550fd View commit details
    Browse the repository at this point in the history

Commits on May 23, 2023

  1. Add Latin Finance wp cli command for Redirecting Magazine Issues

    Command will export a CSV file that needs to be reviewed by hand
    and adjusted prior to being imported into Redirection plugin. Adjustment
    details are still being finalized. No CSV upload at this point.
    
    Command:
    wp newspack-content-migrator latinfinance-check-redirects-magazine-issues
    
    Output:
    CSV in WP_CONTENT_DIR
    ronchambers committed May 23, 2023
    Configuration menu
    Copy the full SHA
    8bd9a29 View commit details
    Browse the repository at this point in the history

Commits on May 24, 2023

  1. Fix for Redirects for Latin Finance Magazine Issues redirects

    Fixes previous commit related to wp cli command:
    wp newspack-content-migrator latinfinance-check-redirects-magazine-issues
    
    This new fix will properly export a CSV file for upload into Redirctions
    plugin. The redirects will capture old website /magazine/[issues] urls
    and redirect them to new /magazine/year/monthnum/ urls.
    ronchambers committed May 24, 2023
    Configuration menu
    Copy the full SHA
    eb5e1ff View commit details
    Browse the repository at this point in the history
  2. Add Latin Finance internal Read Digtial Edition links

    Old site magazine redirects have been added, but internal links were
    not. This will redirect WP links like:
    
    '/magazine/yyyy/mon/day/read-digital-edition' to offsite digital PDF viewer.
    
    Command:
    wp newspack-content-migrator latinfinance-check-redirects-digital-editions
    
    Output:
    Redirects CSV to upload.
    ronchambers committed May 24, 2023
    Configuration menu
    Copy the full SHA
    6d4c537 View commit details
    Browse the repository at this point in the history
  3. Add Latin Finance wp cli command to delete duplicate meta.

    Some posts were inserted twice via the wordpress importer. The importer
    did not create 2 posts, but instead it added the 2nd post's postmeta
    to the first post that already existed. This command will delete
    all duplicated postmeta where the post_id, meta_key, and meta_value
    all match.
    
    Command:
    wp newspack-content-migrator latinfinance-delete-duplicate-meta
    
    Arguments:
    --query-limit=integer
    (use this to limit large sql queries).
    ronchambers committed May 24, 2023
    Configuration menu
    Copy the full SHA
    6d5e2cb View commit details
    Browse the repository at this point in the history

Commits on May 25, 2023

  1. Add Latin Finance wp cli command to "delete" error posts from import

    The importer "merged" duplicate posts from the old system into single
    posts. It will be easier to just delete the single posts, then re-
    import the original posts later. Each post that is "deleted" accounts
    for 2 articles from the old client website.
    
    Command:
    wp newspack-content-migrator latinfinance-delete-error-imports
    
    Output:
    CSV report is output. Nothing is actually deleted. There is a link
    to each post in the CSV that can be used to delete each post by
    hand.
    ronchambers committed May 25, 2023
    Configuration menu
    Copy the full SHA
    d806d6c View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Add Latin Finance wp cli command to Fix merged Categories

    Resets duplicate categories that wp importer merged as one. The categories
    are children "Hydro", "Solar", "Wind" under both "Energy" and "ESG.
    
    This code uses the postmeta 'newspack_lf_categories' to reset
    the categories to the proper posts.
    
    Command:
    wp newspack-content-migrator latinfinance-fix-duplicate-categories
    
    Output:
    Screen report of removals and additions. If errors, "by hand" fixes
    needed will be shown.
    ronchambers committed May 26, 2023
    Configuration menu
    Copy the full SHA
    c9857d1 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2023

  1. Add LatinFinance wp cli to fix Images in post content due to "&" chars

    The wordpress importer had trouble replacing post_content image urls
    when the urls contained "&" characters. This was fixed with an update
    to the newspack-cms-importers WXR creator, but there were some images
    that still needed updating in the post_content.
    
    Command:
    wp newspack-content-migrator latinfinance-fix-images-in-content
    
    Ouput:
    Screen report of DB fixes, along with todo by-hand fixes needed.
    ronchambers committed May 30, 2023
    Configuration menu
    Copy the full SHA
    557d0e9 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Fix Latin Finance wp cli for cleaning up images in post content

    Missing old_assests images will now be removed from the post_content.
    
    Command:
    wp newspack-content-migrator latinfinance-fix-images-in-content
    
    Ouput:
    Screen report of DB fixes, along with todo by-hand fixes needed.
    ronchambers committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    3c34186 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. Work in progress: Latin Finance pre-launch testing

    Added previous checksum checking and log to output files for by-hand
    review.
    ronchambers committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    1d963cd View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2023

  1. Work in progress: Latin Finance pre-launch checks vs staging

    Checks for new client categories, dupliate slugs, and post_exists
    ronchambers committed Aug 5, 2023
    Configuration menu
    Copy the full SHA
    d337790 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2023

  1. Add Latin Finance launch command for CoAuthors plus

    Added a secondary command to setting coauthors plus based on diff
    between initial load and launch data.
    ronchambers committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    8bb724f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e0f546b View commit details
    Browse the repository at this point in the history
  3. Fix Latin Finance image fix wp cli function

    Small regex fix and more logging
    ronchambers committed Aug 8, 2023
    Configuration menu
    Copy the full SHA
    ad403ee View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2023

  1. Configuration menu
    Copy the full SHA
    2815832 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2023

  1. Configuration menu
    Copy the full SHA
    5726186 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2023

  1. Add Latin Finance CLI for set subtitles

    Copied from original function to limit functionality to just missing
    posts.
    ronchambers committed Aug 21, 2023
    Configuration menu
    Copy the full SHA
    592fa07 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2023

  1. Configuration menu
    Copy the full SHA
    008151e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a77b2f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    23a96cc View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    57905f0 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Configuration menu
    Copy the full SHA
    0f3c4a1 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2023

  1. Configuration menu
    Copy the full SHA
    ae2b4a8 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    07adada View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2023

  1. Configuration menu
    Copy the full SHA
    ae64f37 View commit details
    Browse the repository at this point in the history

Commits on Sep 25, 2023

  1. Configuration menu
    Copy the full SHA
    eb1ca86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de3786f View commit details
    Browse the repository at this point in the history