Don't redirect unpublished nodes to login page
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3563819. --> Reported by: [pameeela](https://www.drupal.org/user/1431110) Related to !719 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>In <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/drupal_cms/-/work_items/3545841" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/drupal_cms/-/work_items/3545841</a></span> we fixed an issue with styles not loading correctly on the login form if the page is a 403.</p> <p>We didn't take into account that we want to throw a 404 for unpublished nodes, which we have an ECA workflow for. This is causing one of the Byte tests to fail, although I don't understand why this is only happening now.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Install Drupal CMS</li> <li>Visit the unpublished Privacy page</li> <li>See you are redirected to the login page</li> </ol> <p>Expected result is a 404.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Don't redirect if the route is a canonical node.</p>
issue