Incorrect return path after deleting a photo #1459

Open
opened 2026-10-05 00:44:46 +02:00 by adam · 2 comments
Owner

Hi,

Piwigo -> Photos > Batch management -> filter on one album -> Edit one photo -> delete this photo
Then the next page displayed is "homepage"
and it is needed to go back to "admin" > Photos > and so on

Done several times, identical behaviour each time.

Piwigo 12.2.0
OS: Linux / Rapsberry pi / 11 (bullseye)
PHP: 7.4.28
MySQL: 5.5.5-10.5.15-MariaDB-0+deb11u1
Graphics library: External ImageMagick 6.9.11-60

Hi, Piwigo -> Photos > Batch management -> filter on one album -> Edit one photo -> delete this photo Then the next page displayed is "homepage" and it is needed to go back to "admin" > Photos > and so on Done several times, identical behaviour each time. Piwigo 12.2.0 OS: Linux / Rapsberry pi / 11 (bullseye) PHP: 7.4.28 MySQL: 5.5.5-10.5.15-MariaDB-0+deb11u1 Graphics library: External ImageMagick 6.9.11-60 <!-- github-sync-id:1263440735 -->
Author
Owner

Any news on this issue?

Any news on this issue? <!-- github-comment-id:1261012348 -->
Author
Owner

this is the expected behavior:

if (isset($_GET['delete']))
{
  check_pwg_token();

  delete_elements(array($_GET['image_id']), true);
  invalidate_user_cache();

  // where to redirect the user now?
  //
  // 1. if a category is available in the URL, use it
  // 2. else use the first reachable linked category
  // 3. redirect to gallery root

Where would you expect Piwigo to redirect you once the photo is deleted?

this is the expected behavior: ``` if (isset($_GET['delete'])) { check_pwg_token(); delete_elements(array($_GET['image_id']), true); invalidate_user_cache(); // where to redirect the user now? // // 1. if a category is available in the URL, use it // 2. else use the first reachable linked category // 3. redirect to gallery root ``` Where would you expect Piwigo to redirect you once the photo is deleted? <!-- github-comment-id:1261179765 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1459