Comments

kristen pol created an issue. See original summary.

kristen pol’s picture

Status: Active » Needs review
kristen pol’s picture

Title: Ensure translation is loaded via getTranslation(). » [quant_cron] Ensure translation is loaded via getTranslation().
kristen pol’s picture

Title: [quant_cron] Ensure translation is loaded via getTranslation(). » Ensure translation is loaded via getTranslation() in quant_cron and QueueItem

The code is updated so that Seed::seedNode() uses the translated entity in two areas, so that the correct entity data is available, e.g., published status:

  • quant_cron_cron
  • NodeItem::send

To test the first, we need to use cron like:

  1. Do not sync upon content edit
  2. Translate a node and make it published
  3. Look in Quant and the content will be missing
  4. Run cron and it will show up in the dashboard
  5. Repeat with the translation as unpublished and you won't see the content in dashboard after running cron
  6. Change the quant settings to sync unpublished content and run cron again and then it will show up in the dashboard

Test it doesn't work before the change and it does afterwards.

kristen pol’s picture

Status: Needs review » Needs work

The PR needs to be updated based on my comments in GitHub

kristen pol’s picture

Title: Ensure translation is loaded via getTranslation() in quant_cron and QueueItem » Ensure translation is loaded via getTranslation() when seeding content
kristen pol’s picture

On D11, when testing without the changes, the unpublished translation doesn't get pushed over, but this error shows up in the logs:

Path: /af/node/12. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: in Drupal\Core\Routing\AccessAwareRouter->checkAccess() (line 115 of /var/www/html/web/core/lib/Drupal/Core/Routing/AccessAwareRouter.php).
kristen pol’s picture

I tested on D11 with translated unpublished taxonomy term without the patch and the term was pushed to quant.

Tested again with the PR branch and it didn't push the term content

kristen pol’s picture

Tested on D10 on 1.x branch and one thing I noticed (which is probably still an issue for D11/2.x too)... if you have it set to push unpublished content, you don't get it because that setting isn't being honored in this code. But that's a separate bug, so we can handle it separately

kristen pol’s picture

Assigned: kristen pol » Unassigned
Status: Needs work » Fixed

This has been merged for both 1.x and 2.x

kristen pol’s picture

Status: Fixed » Closed (fixed)