A large number of staff profiles were created before we added the field to control whether there was a staff profile page created. Then many of them were bulk published and have never been saved by a human. The result is, the field does not exist in their revisions. As a result, many incorrectly show that a FE page is "pending" when in fact they have no FE page. There is also a preview button which should not be showing for pages that have no checkbox checked or no content in the fields that appear.
The problem is fixed by a human editing the page and then saving it.
However given the number of pages affected, there is an easy code fix.
Saving the node without making any changes will fix the problem
AC / Expected behavior
[ ] I expect that when a profile does not have the "Create profile page with biography" checkbox checked (field_complete_biography_create) there should be no FE url shown at all (no pending either)
[ ] I expect that when a profile does not have the "Create profile page with biography" checkbox checked (field_complete_biography_create) there should be no "Preview button"
[ ] I expect that this works for nodes that are old and have not been previously saved by a human editing the node.
Describe the defect
A large number of staff profiles were created before we added the field to control whether there was a staff profile page created. Then many of them were bulk published and have never been saved by a human. The result is, the field does not exist in their revisions. As a result, many incorrectly show that a FE page is "pending" when in fact they have no FE page. There is also a preview button which should not be showing for pages that have no checkbox checked or no content in the fields that appear.
The problem is fixed by a human editing the page and then saving it.
However given the number of pages affected, there is an easy code fix.
Original Slack reporting and investigation
To Reproduce
Steps to reproduce the behavior:
Go to 'https://prod.cms.va.gov/butler-health-care/staff-profiles/breigh-speidel'
Look on the top of the right rail
Saving the node without making any changes will fix the problem
AC / Expected behavior
Screenshots
Timeline of bots altering the nodes.
Never existed
Additional context
The code to prevent the pending was added in https://github.com/department-of-veterans-affairs/va.gov-cms/pull/7940/files Feb 2022.
A simple alteration to the logic to make it look for a positive will fix this