Announcement

#1 2021-04-12 03:57:19

thanatoast
Member
2021-04-12
5

Unable to move image to another album

Howdy,
I am attempting to move an image from one folder to another. An error message flashes up for less than a second. I had to make a video and pause it to type the error below: (Text in {}'s omitted by me. Odd newline placement as displayed.)
----------------------------------------------------------------------
Notice
: Undefined index: move in
{path to domain}/piwigo/admin/batch_manager_global.php
on line
201


Warning
: Cannot modify header information - headers already sent by (output started at {path to domain}/piwigo/admin/batch_manager_global.php)
{path to domain}/piwigo/include/page_header.php
on line
94
----------------------------------------------------------------------

This looks like the same problem as https://piwigo.org/forum/viewtopic.php?id=26773
As I am getting a similar message. I am hesitant to just edit the php code since that is a 5 year old problem and I am not that familiar with php. Also, wouldn't it just break again when it gets updated?

Environment details: (Running on a dreamhost server)
Piwigo 11.4.0
Operating system: Linux
PHP: 7.2.34 (Show info) [2021-04-11 18:44:30]
MySQL: 5.7.29-log [2021-04-11 18:44:35]
Graphics Library: ImageMagick 6.9.7-4

Piwigo URL: {private}

Any idea what is going on and what I need to do to fix this?

Thanks in advance.

Offline

 

#2 2021-04-13 05:39:43

thanatoast
Member
2021-04-12
5

Re: Unable to move image to another album

I googled (site:piwigo.org inurl:release) and found Version 2.8.0 released July 8th, 2016 and assumed that was the version at the time (christianm on August 1, 2016).
Excerpt from piwigo/admin/batch_manager_global.php (v2.8.0)
196:    else if (isset($_SESSION['bulk_manager_filter']['category'])
197:        and $_POST['move'] != $_SESSION['bulk_manager_filter']['category'])

christianm changed line 197 to:
197:        and (isset($_POST['move']) ? $_POST['move'] : null) != $_SESSION['bulk_manager_filter']['category'])


The version I have (11.4.0) had a same error on line 201:
200:    else if (isset($_SESSION['bulk_manager_filter']['category'])
201:        and $_POST['move'] != $_SESSION['bulk_manager_filter']['category'])

So, exactly the same code as the older version.

I got to learn some php:
isset:    Determine if a variable is declared (not the same as null).
X ? Y : Z    Means IF X is true THEN Y ELSE Z (ternary if-then-else)
$_POST      looks like a hash.

The test on 200-201 (and old version 196-197):
... else if session bulk_manager_filer/category is set AND post move does not equal sesson bulk_manager_filter/category

christianm's edit:
... else if session bulk_manager_filer/category is set AND (if post move is set THEN post move, otherwise null) does not equal sesson bulk_manager_filter/category

So christianm's edit tests if $_POST['move'] is set. if it is it uses it, otherwise it uses null and compares it (post move or null) to session bulk_manager_filter/category.

That mostly makes sense to me. It did test if the session hash was set, so why not the post one?
I am not familiar with this code at all, so what I do not understand is why it would or would not be set.

Also, if this is a bug, why it's still there from 5 years ago? Surely I am not the first person since christianm to need to move a file? If I make this edit, will it break again at the next upgrade? I thought I would just register this as a bug but the bug tracker doesn't seem to be working either (http://piwigo.org/bugs just times out/504). Anyone?

Thanks

Offline

 

#3 2021-04-13 15:03:00

erAck
Only trying to help
2015-09-06
2021

Re: Unable to move image to another album

If that was a general failure then there likely were more reports about it..
However, the old bug tracker link is outdated, please use https://github.com/Piwigo/Piwigo/issues instead.


Running Piwigo at https://erack.net/gallery/

Offline

 

#4 2021-04-24 17:48:47

thanatoast
Member
2021-04-12
5

Re: Unable to move image to another album

Update:
  It's been two weeks and I have not been able to figure this out. In desperation I went ahead and made the edit suggested by the link above.
The error has gone away. But it now just quietly fails to move the image.
Thinking it was a permission issue I have tried multiple file permissions and still it does nothing.

I would really appreciate help with this issue.

Thanks

Offline

 

#5 2021-05-07 07:22:24

thanatoast
Member
2021-04-12
5

Re: Unable to move image to another album

I'm still stuck with images in the wrong album. When I attempt to move the image to a different album it stays in the original album. I did notice that when I edit the image, the album I moved it to is listed in "Linked Albums" along with the original album. I can click on an X on the new album and remove it (not what I want to do) but the original album does not have an X.

Maybe this information would be beneficial for someone to help me with this. I've been at this nearly a month trying to move these images to another album!

Thanks

Offline

 

#6 2021-05-07 08:07:39

Zentalquabula
Member
2014-05-10
217

Re: Unable to move image to another album

Disable ALL plugins and then move your image.

You can also reenable plugins one by one to see where the culprit is.

It could also be related ot a theme or anything else that isn't part of the standard installation.

Offline

 

#7 2021-05-08 01:13:18

thanatoast
Member
2021-04-12
5

Re: Unable to move image to another album

I have not added any themes or plugins. I deactivated "LocalFiles Editor" which was the only plugin enabled and I am still unable to move the photos out of the album.
I tried moving a lot of photos and it the only ones I am unable to move were ftp'd to the server, rather than uploaded via the web interface. It seems like a permission issue but the folders and images have the same permissions and, as I said, I tried a ton of different permissions.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact