Cover image disappears


Due to a lack of free time, both support on this forum and extension development are currently limited.
All bugs are noted and saved for fixes, even if there are no replies to the posts.
Normal activity will resume as soon as possible.
no_avatar
corleone
 
Posts: 6
Joined: Fri May 23, 2025 12:59 am
 Fri Jul 18, 2025 9:11 am • via iPhone
Post I just got from a member

What is the wall? Had some pics posted there but were gone a day later....
no_avatar
corleone
 
Posts: 6
Joined: Fri May 23, 2025 12:59 am
 Thu Jul 24, 2025 3:03 am • via iPhone
So it appears on my site, the images delete the first time you upload them, when you upload images a 2nd time, they stay.

Any ideas why this would be?
no_avatar
bennybernaer
 
Posts: 25
Joined: Thu Feb 05, 2015 10:37 am
 Sat Sep 13, 2025 7:08 pm • via Web
Same problem here.
no_avatar
JollyRoger
 
Posts: 4
Joined: Thu Mar 05, 2026 1:10 am
 Mon Mar 16, 2026 2:45 am • via Web
Happening to me as well, going to try that .htaccess fix from earlier in the thread.
no_avatar
mandifaux
 
Posts: 6
Joined: Sun Oct 20, 2024 11:09 pm
 Mon May 11, 2026 3:59 am • via Web
Hey there. Just popping in to mention I may have found the actual solution to this issue. What I did is:

Go to the ext/canidev/follower/cron folder

In there, open up the file called tiny.php

Go to line 73 where it looks like this:
Code: Select all
      // Delete orphan attachments
      $attach_ary = [];

      $sql = 'SELECT item_id, item_data
         FROM ' . $this->tables['data'] . '
         WHERE item_type = ' . constants::ITEM_ATTACHMENT . '
         AND comment_id = 0


after the line AND comment_id = 0

ADD:
Code: Select all
         AND user_id = 0


save.

If you did my previous htaccess change, revert it back to normal.

With that change I have tested it and the cover image is no longer deleting. It appears to look into the database and see there is no comment ID associated with that file, considers it an orphan attachment, and deletes it. With having it consider if a user ID is attached to the file (aka is not 0), it is no longer considered orphan, and leaves it.

Back up your own copy of the extension, just in case. But that extra line addition is working perfectly in my case. As always, YMMV. Hope it helps.
no_avatar
corleone
 
Posts: 6
Joined: Fri May 23, 2025 12:59 am
 Mon May 11, 2026 4:21 pm • via Web
mandifaux wrote:Hey there. Just popping in to mention I may have found the actual solution to this issue. What I did is:

Go to the ext/canidev/follower/cron folder

In there, open up the file called tiny.php

Go to line 73 where it looks like this:
Code: Select all
      // Delete orphan attachments
      $attach_ary = [];

      $sql = 'SELECT item_id, item_data
         FROM ' . $this->tables['data'] . '
         WHERE item_type = ' . constants::ITEM_ATTACHMENT . '
         AND comment_id = 0


after the line AND comment_id = 0

ADD:
Code: Select all
         AND user_id = 0


save.

If you did my previous htaccess change, revert it back to normal.

With that change I have tested it and the cover image is no longer deleting. It appears to look into the database and see there is no comment ID associated with that file, considers it an orphan attachment, and deletes it. With having it consider if a user ID is attached to the file (aka is not 0), it is no longer considered orphan, and leaves it.

Back up your own copy of the extension, just in case. But that extra line addition is working perfectly in my case. As always, YMMV. Hope it helps.


Thank you for this, I just gave it a try, hope it works! Just out of curiosity, what was changing that was allowing the image to stay when added a second time? For my site, the image would delete after first uploading, but if you re-did it, it would stay permanent.
Previous

Who is online

Users browsing this forum: No registered users and 0 guests