- Issue created by @NicholasS
- πΊπΈUnited States NicholasS
So I tried batch and it works over the UI but does not populate during a drush cim install of the module.
- @nicholass opened merge request.
- Merge request !17Include https://www.drupal.org/project/views_url_alias/issues/3396154 β (Open) created by NicholasS
- πΊπΈUnited States NicholasS
So tested this locally and MR 16 is just the Queue API change, but I had another issue open and need that as well so that is MR 17 since I can't have 2 patches pathing the same lines.
Please review MR 16
- Status changed to Needs review
about 1 year ago 2:57pm 25 October 2023 - πΊπΈUnited States NicholasS
I have done a lot of testing on my site and I think MR17 should be reviewed it fixes multiple things with this module and works as intended.
- First commit to issue fork.
- π¨π¦Canada joel_osc
Great patch everyone! Necessary on my site in order to use this module. I noticed that some nodes could not be found by alias, in looking at it I found the queueing code was storing paths that it had already done and checking that before queueing. They key the code used did not have the langcode of the path so I was only getting each node in one of two languages. Small fix committed above.
- π¨π¦Canada dstorozhuk Chicago πΊπΈ, Toronto π¨π¦, Kyiv πΊπ¦
- π¨π¦Canada dstorozhuk Chicago πΊπΈ, Toronto π¨π¦, Kyiv πΊπ¦
Queue options might not work for people who has cron disabled for some reason.
I think the right option here is Batch operation for views_url_alias_rebuild_path(). But also module installation should use batch somehow. - π§πͺBelgium michaelsoetaert
I've rerolled the changes from MR#17 on branch
8.x-2.x-with-issue-3396154
on the latest version of the3.x
branch.We needed multilingual support (different URL aliases for different translations), which branch
3.x
provides, but we were also getting timeouts because of the size of the website (where the changes in this issue come into play). - π§πͺBelgium michaelsoetaert
Sadly, the patch in comment #13 π Timeout on large sites nodes during install Needs review still resulted in timeouts on our higher environments (due to different PHP values). The issue seemed to be the large amount of data being loaded in
views_url_alias_rebuild_path
, since it's retrieving the completeEntity
-object of each path alias.I decided to try the approach @dstorozhuk suggested (using the Batch API). Only loading the path alias IDs in
views_url_alias_rebuild_path
, splitting the list in chunks and only loading theEntity
-objects of the given path alias IDs in each batch operation. That seems to have fixed the timeouts.Attached patch with the described functionality.