TryGhost
OSS
Ghost
Overview
Sign in / Sign up
Open main menu
Ghost
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
29482
5d607c98 Fixed lazy URL primary_tag on tied tag sort_order ref https://linear.app/ghost/issue/HKG-1822 primary_tag is a post's first tag if it is public, so it depends on the order the tags relation returns. The lazy URL path loads tags through the model's tags() relation, which orders by sort_order with no tie-breaker. When several of a post's tags share a sort_order — the state bulk and import operations leave behind — MySQL is free to return them in different orders per query, so the lazy path could resolve a different primary_tag than the eager service and build a different URL for the same post under a {primary_tag} permalink (seen in production as eager serving /disaster-preparedness/ while the serializer produced /claremont-elmwood/). Order tags()/authors() by posts_tags.id / posts_authors.id (attach order) after sort_order. That is the tag the eager service already serves, so the lazy path now matches it without touching eager's own raw-knex query. The pivot id is added to withPivot because the relation query uses DISTINCT, which requires ORDER BY columns to appear in the SELECT list.
by Fabien O'C...
F
Previous page
Previous
Next
Next page