Ghost icon indicating copy to clipboard operation
Ghost copied to clipboard

Tags added in bulk do not update post routing

Open cathysarisky opened this issue 9 months ago • 4 comments

Issue Summary

Adding a tag in bulk does not seem to trigger a recalculation of what collection the the post belongs in. This causing confusing issues for sites with non-default routes.yaml files that use tags for filtering .

Steps to Reproduce

Create two collections. The first one should be filtered by tag. i.e.

collections:
  /easy/:
    permalink: /easy/{slug}/
    filter: 'tags:[easy]'
  /:
    permalink: /{slug}/
    template: index

Using the list of posts (not the single post editor), bulk assign some posts the 'easy' tag.

Expectation - those posts will appear at /easy/. Actual - those posts do not appear in the /easy/ collection until they're either individually edited and saved, or until a new copy of routes.yaml is uploaded, or possibly other conditions not yet identified.

The posts do appear in /tag/easy immediately, but it appears that the collection routes aren't getting updated?

Ghost Version

5.109

Node.js Version

all

How did you install Ghost?

several options - doesn't seem to matter?

Database type

MySQL 8

Browser & OS version

No response

Relevant log / error output


Code of Conduct

  • [x] I agree to be friendly and polite to people in this repository

cathysarisky avatar Feb 20 '25 14:02 cathysarisky

This is a known issue, whereby bulk edits don't fire internal model events. Those events drive loads of followup actions including updating routing, sitemaps etc.

We need to get this wired up in a sane way because bulk editing can fire a lot of events.

The solution short term is to do a normal edit after a bulk edit... that usually gets everything back in order and is why this isn't causing as many issues as we'd expect rn.

ErisDS avatar Mar 14 '25 19:03 ErisDS

Understood on not wanting to cause a huge server load spike, but the present situation does make the bulk tool a lot less useful. I've basically got to tell clients not to use it if they want their Algolia index to stay sync'd, their routing to work, etc.

The updates wouldn't have to fire /fast/ on bulk events. Could it go into the jobs queue or something? I'd be perfectly happy if things were caught up an hour later.

cathysarisky avatar Mar 14 '25 19:03 cathysarisky

Yeah exactly, it needs to work with a queue, which we didn't have back when the feature was implemented!

ErisDS avatar Mar 17 '25 11:03 ErisDS

I have almost a fix for this -- everything is working except that if I add a new tag with the bulk tag add, Ember thinks its failing even though it works. (It's apparently waiting for some return it isn't getting ... and I haven't quite sorted out what, because Ember.)

cathysarisky avatar May 14 '25 14:05 cathysarisky

Our bot has automatically marked this issue as stale because there has not been any activity here in some time.

The issue will be closed soon if there are no further updates, however we ask that you do not post comments to keep the issue open if you are not actively working on a PR.

We keep the issue list minimal so we can keep focus on the most pressing issues. Closed issues can always be reopened if a new contributor is found. Thank you for understanding 🙂

github-actions[bot] avatar Sep 05 '25 06:09 github-actions[bot]