UCDavisLibrary / main-wp-website-deployment

Deployment files and commands for library.ucdavis.edu
1 stars 1 forks source link

Stage data has many instances of www.library.ucdavis.edu in post_content (and other ) #27

Closed qjhart closed 1 year ago

qjhart commented 2 years ago

There are about 38 published items (only 30 pages, 4 news, 2 exhibits) that have a link to www.library.ucdavis.edu in their content. There should be no mention of www.library.ucdavs.edu in stage data. This causes multiple problems; Links that may not exist will show as existing; new pages cannot be navigated to; and on go-live pages that don't exist.

For example; https://stage.library.ucdavis.edu/data-analysis-and-management/ points to an existing page, https://www.library.ucdavis.edu/service/research-data-services/describe-2/ which has no matching slug.

The strategy should be to just fix these items one-by-one

mysql> select id,post_type,post_name from wp_posts where post_status='publish' && post_content like '%www.library.ucdavis.edu%';
+-------+-----------+------------------------------------------------------------------------------+
| id    | post_type | post_name                                                                    |
+-------+-----------+------------------------------------------------------------------------------+
|  3656 | page      | library-accounts                                                             |
|  3664 | page      | request-books                                                                |
|  3729 | page      | data-analysis-and-management                                                 |
|  3737 | page      | preserve-your-research                                                       |
|  3775 | page      | whats-new                                                                    |
|  4329 | page      | vpn                                                                          |
|  4355 | page      | vpn-installation-guide-windows                                               |
|  4377 | page      | vpn-installation-guide-mac                                                   |
|  4385 | page      | vpn-installation-guide-apple-iphone-or-ipad                                  |
|  4415 | page      | faq                                                                          |
|  4420 | page      | accessing-resources-with-single-sign-on                                      |
|  4550 | page      | about-michael-and-margaret-b-harrison                                        |
|  5727 | page      | citation-management-tools                                                    |
|  5751 | page      | health                                                                       |
|  5949 | page      | tome-fund                                                                    |
|  6566 | page      | california-collection                                                        |
|  6880 | page      | course-reserves-for-instructors                                              |
|  6935 | page      | get-it-at-uc-links                                                           |
|  7085 | page      | brooke-robinson                                                              |
|  8319 | page      | african-american-history-collection                                          |
|  8572 | page      | blanchard-richard-rare-book-collection                                       |
|  8903 | page      | foot-isaac-early-english-pamphlet-collection                                 |
|  8917 | page      | native-american-history-and-collection                                       |
|  8923 | page      | ogden-c-k-library                                                            |
|  8929 | page      | political-book-and-pamphlet-collections                                      |
|  8947 | page      | turtle-island-collection-of-environmental-and-nature-writing                 |
|  9758 | page      | michael-montgomery                                                           |
|  9826 | page      | tara-allison                                                                 |
| 10997 | page      | archive-of-initiatives-and-projects                                          |
| 11600 | page      | gaming-metrics-conference-2016                                               |
| 11610 | exhibit   | mental-health-for-healthcare-providers-improving-resiliency-avoiding-burnout |
| 11913 | exhibit   | maynard-amerine-words                                                        |
| 11933 | page      | uc-pay-it-forward-project                                                    |
| 12023 | page      | data-rights-and-data-wrongs                                                  |
| 12619 | post      | undergrads-apply-for-the-lang-prize                                          |
| 12631 | post      | plan-ahead-for-winter-break-shields-will-be-closed-library-services-limited  |
| 12697 | post      | speaker-series-celebrates-womens-suffrage-centennial                         |
| 13787 | post      | undergrads-apply-for-the-lang-prize-2                                        |
+-------+-----------+------------------------------------------------------------------------------+
38 rows in set (0.08 sec)

In addition, there is one meta_value with www.library in the content. I can't figure out what this is supposed to be:

mysql> select meta_key,count(*) as count from wp_postmeta where meta_value like '%www.library.ucdavis.edu%' group by meta_key order by meta_key;
+------------------------------------------+-------+
| meta_key                                 | count |
+------------------------------------------+-------+
| _oembed_8a2492957ffa42cc7234942cfd205d90 |     1 |
+------------------------------------------+-------+
mysql> select * from wp_postmeta where meta_key='_oembed_8a2492957ffa42cc7234942cfd205d90';
+---------+---------+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| meta_id | post_id | meta_key                                 | meta_value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
+---------+---------+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|   21275 |   10190 | _oembed_8a2492957ffa42cc7234942cfd205d90 | <blockquote class="wp-embedded-content" data-secret="VgeLIbh5LK"><a href="https://www.library.ucdavis.edu/code-of-conduct/">Code of Conduct</a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);" title="&#8220;Code of Conduct&#8221; &#8212; UC Davis Library" src="https://www.library.ucdavis.edu/code-of-conduct/embed/#?secret=VgeLIbh5LK" data-secret="VgeLIbh5LK" width="500" height="282" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> |
+---------+---------+------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

I don't see any values in wp_options

qjhart commented 2 years ago

@NeilWeingarten, I updated the data to the newest. This changes some things, making this easier. Most of the news items are fixed. So, I think you can just go through and fix these items by hand.

qjhart commented 2 years ago

@spelkey-ucd I think your only task relates to the wp_postmeta field (see above). I'm not sure what this does.

NeilWeingarten commented 2 years ago

Pages are updated other than the ones affected by the file upload issue (sent to James via slack) and a few other outliers. Please rerun the pull when you get a chance to make sure I haven't missed anything else. Thanks!

qjhart commented 2 years ago

@NeilWeingarten Here is the updated list:

+-------+-----------+------------------------------------------------------------------------------+
| id    | post_type | post_name                                                                    |
+-------+-----------+------------------------------------------------------------------------------+
|  3737 | page      | preserve-your-research                                                       |
|  4204 | page      | history-of-uc-davis                                                          |
|  4329 | page      | vpn                                                                          |
|  4355 | page      | vpn-installation-guide-windows                                               |
|  4377 | page      | vpn-installation-guide-mac                                                   |
|  4415 | page      | faq                                                                          |
|  4420 | page      | accessing-resources-with-single-sign-on                                      |
|  4550 | page      | about-michael-and-margaret-b-harrison                                        |
|  5949 | page      | tome-fund                                                                    |
|  6880 | page      | course-reserves-for-instructors                                              |
|  8917 | page      | native-american-history-and-collection                                       |
| 10974 | page      | history                                                                      |
| 11610 | exhibit   | mental-health-for-healthcare-providers-improving-resiliency-avoiding-burnout |
| 11928 | exhibit   | mckinnon-ruble-families-papers                                               |
| 11933 | page      | uc-pay-it-forward-project                                                    |
| 12013 | page      | publish-share-and-preserve-your-data                                         |
| 14340 | page      | robert-g-mondavi-papers                                                      |
+-------+-----------+------------------------------------------------------------------------------+
NeilWeingarten commented 2 years ago

Not seeing www.library.ucdavis.edu links on the following pages:

3737 - Preserve Your Research: https://stage.library.ucdavis.edu/research-write/preserve-your-research/

4329 - The Library VPN: https://stage.library.ucdavis.edu/vpn/

4355 - VPN Installation Guide: Windows (3 Steps): https://stage.library.ucdavis.edu/vpn/vpn-installation-guide-windows/

4377 - VPN Installation Guide: Mac (3 Steps): https://stage.library.ucdavis.edu/vpn/vpn-installation-guide-mac/

4415 Library VPN: Frequently Asked Questions: https://stage.library.ucdavis.edu/vpn/faq/

4550 - About Michael and Margaret B. Harrison: https://stage.library.ucdavis.edu/archives-and-special-collections/our-collections/harrison-western-research-center/about-michael-and-margaret-b-harrison/

6880 - Course Reserves for Instructors: https://stage.library.ucdavis.edu/teaching-support/course-reserves-for-instructors/

10974 - History of the Library: https://stage.library.ucdavis.edu/about/history/

12013 - Publish, Share, and Preserve your Data: https://stage.library.ucdavis.edu/data-analysis-and-management/publish-share-and-preserve-your-data/

The following pages have known issues and are being fixed:

Other pages should be fixed.

qjhart commented 2 years ago

@NeilWeingarten Latest is:

mysql> select id,post_type,post_name from wp_posts where post_content like '%www.library.ucdavis.edu%' an
d post_status='publish' order by id;
+-------+-----------+--------------------------------------------+
| id    | post_type | post_name                                  |
+-------+-----------+--------------------------------------------+
|  3737 | page      | preserve-your-research                     |
|  3793 | page      | diversity                                  |
|  4277 | page      | local-and-california-history               |
|  4415 | page      | faq                                        |
|  5949 | page      | tome-fund                                  |
|  8917 | page      | native-american-history-and-collection     |
| 11933 | page      | uc-pay-it-forward-project                  |
| 12013 | page      | publish-share-and-preserve-your-data       |
| 13692 | exhibit   | timeline                                   |
| 16231 | page      | wine-writers-collection-development-policy |
+-------+-----------+--------------------------------------------+

For 3737 if you use code view, you can see:

>Scholarly Communications Program</a><a href="https://www.library.ucdavis.edu/special-collections/"> </a>and others.</p>
<!-- /wp:paragraph -->

3793:

>Middle Eastern/South Asian Studies</a></strong></li><li><strong><a rel="noreferrer noopener" href="https://www.library.ucdavis.edu/guide/native-american-studies/" target="_blank">Native American Studies</a></strong></li></ul>

4277 This is a new problem, and there are 35 bad links eg

<!-- wp:ucd-theme/button-link {"content":"Explore the Collections","href":"https://www.library.ucdavis.edu/archives-and-special-collections/manuscripts/california-history/","className":"is-style-primary"} /-->
<!-- /wp:ucd-theme/background-image -->

4415

<!-- wp:list {"className":"list\u002d\u002darrow"} -->
<ul class="list--arrow"><li>Connect to the&nbsp;<a href="https://www.library.ucdavis.edu/service/connect-from-off-campus/">l</a>ibrary VPN using Pulse Secure&nbsp;on your computer or mobile device using your UC Davis CAS/Kerberos credentials,&nbsp;</li></ul>
<!-- /wp:list -->

12013

<!-- wp:paragraph -->
<p>To make your data findable, you'll first need a Digital Object Identifier or DOI<img width="16" height="16" srcset="https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_.png 130w, https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_-32x32.png 32w, https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_-50x50.png 50w, https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_-64x64.png 64w, https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_-96x96.png 96w, https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_-128x128.png 128w" src="https://www.library.ucdavis.edu/wp-content/uploads/2017/03/DOI_logo.svg_.png" alt="">, a link to a permanent URL.&nbsp;To share and preserve your data, you need to be able to refer to your files unambiguously. </p>
<!-- /wp:paragraph -->

13692 is new:

<!-- wp:list {"className":"list\u002d\u002dbordered"} -->
<ul class="list--bordered"><li><a href="https://www.library.ucdavis.edu/exhibit/uc-davis-centennial/uc-davis-library-timeline-1910-library-documents-from-1910-11/" data-type="URL" data-id="https://www.library.ucdavis.edu/exhibit/uc-davis-centennial/uc-davis-library-timeline-1910-library-documents-from-1910-11/">More about Gertrude Frances Weber</a></li></ul>
<!-- /wp:list -->

and 
<!-- wp:list {"className":"list\u002d\u002dbordered"} -->
<ul class="list--bordered"><li><a href="https://www.library.ucdavis.edu/exhibit/uc-davis-centennial/uc-davis-library-timeline-1987-endowment-created-the-margaret-b-harrison-preservation-department/" data-type="URL" data-id="https://www.library.ucdavis.edu/exhibit/uc-davis-centennial/uc-davis-library-timeline-1987-endowment-created-the-margaret-b-harrison-preservation-department/">More about the Margaret B. Harrison Preservation Department</a></li></ul>
<!-- /wp:list -->

16231 also new: (4 items)

<!-- wp:paragraph -->
<p><a href="https://www.library.ucdavis.edu/archives-and-special-collections/manuscripts/viticulture-and-enology/">Viticulture and Enology</a>,&nbsp;<a href="https://search.library.ucdavis.edu/primo-explore/search?query=any,exact,A.W.%20Noling%20Hurty-Peck%20Collection%20of%20Beverage%20Literature,AND&amp;tab=catalog_tab&amp;search_scope=special_collections&amp;sortby=rank&amp;vid=01UCD_V1&amp;lang=en_US&amp;mode=advanced&amp;offset=0">A.W. Noling Hurty-Peck Collection of Beverage Literature</a>,&nbsp;<a href="https://www.library.ucdavis.edu/archives-and-special-collections/manuscripts/food-processing-manufacture/">Food Processing and Manufactur</a>e,&nbsp;<a href="https://www.library.ucdavis.edu/archives-and-special-collections/manuscripts/northern-california-food-movement/">Northern California Food Movement</a>,&nbsp;<a href="https://www.library.ucdavis.edu/archives-and-special-collections/manuscripts/california-history/">California History</a></p>
<!-- /wp:paragraph -->
<!-- /wp:ucd-theme/column -->
NeilWeingarten commented 2 years ago

Fixed:

Still have issues:

NeilWeingarten commented 2 years ago

All pages should be fixed at this point, please rerun to verify and also because I expect new ones have popped up. Thanks!

qjhart commented 2 years ago

@NeilWeingarten these are the current ones:

+-------+-----------+------------------------------+
| id    | post_type | post_name                    |
+-------+-----------+------------------------------+
|  4277 | page      | local-and-california-history |
|  4415 | page      | faq                          |
| 17125 | page      | maynard-andrew-amerine       |
+-------+-----------+------------------------------+
NeilWeingarten commented 2 years ago

All 3 should be fixed now