# PullHotlinkedImages ne remplace plus les images après modification du message

**URL:** https://meta.discourse.org/t/pullhotlinkedimages-does-not-replace-images-again-after-post-is-edited/154184
**Category:** Bug
**Created:** [Juin 8, 2020, 1:33 UTC](https://meta.discourse.org/t/pullhotlinkedimages-does-not-replace-images-again-after-post-is-edited/154184 "2020-06-08T13:33:12Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [Juin 8, 2020, 1:33 UTC](https://meta.discourse.org/t/pullhotlinkedimages-does-not-replace-images-again-after-post-is-edited/154184/1 "2020-06-08T13:33:12Z")

</div>

Salut,

![image](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/meta/original/3X/9/e/9e75dcba3407e60c6487c99cbb45eabafbf7c698.png)

En lien avec :

> <https://github.com/discourse/discourse/commit/28f46c171c18c7c4eb20a591141d42288136c173>
>
> Previously the pull hotlinked images job was skipped after system edits. This en…sured that we never had an infinite loop of system-edit/pull-hotlinked/system-edit/pull-hotlinked etc.
> 
> A side effect was that edits made by system for any other reason (e.g. API, removing full quotes) would prevent pulling hotlinked images. This commit removes the system edit check, and replaces it with another method to avoid an infinite job scheduling loop.

En fait, le problème de téléchargement des images dans les sujets modifiés avec `system` ne semble pas être entièrement résolu. Désolé de ne pas l’avoir remarqué plus tôt. Par exemple, [celui-ci](https://zuzu.chat/t/tenda-mw6-mesh-45-32/64875) ou [celui-là](https://zuzu.chat/t/topic/64467).

Pour rappel, dans notre cas, il s’agit d’un changement de catégorie automatique (via l’API).

Mon client a toujours des sujets où `PullHotlinkedImages` ne fait rien, peu importe ce qu’on fait :

- Suite à un simple `Save Edit` ou même
- `Post.update_all(baked_version: nil)` + `Jobs.enqueue_in(10, :pull_hotlinked_images, post_id: <id>)`

Cependant, cela fonctionne si vous créez un nouveau sujet avec le même contenu.

@david

---

_[View the full topic](https://meta.discourse.org/t/pullhotlinkedimages-does-not-replace-images-again-after-post-is-edited/154184)._
