Users problem

We have a very large collection of photos which, to convert to zenphoto, I have divided into several sections.

We have been creating special Users which use only one section of a first level folder as its allocated 'Managed Album'; - eg. in this collection,
https://graves.eggsa.org/northwest/
a 'user' who is limited to the folder 'North West, BRITS, Urban area' as its 'Managed Albums'.

This makes working much quicker than logging in to the whole site to edit in just one area.

When I refer to a 'user' I am referring to the user as created under the Users tab.

We now find a strange problem - after some time (variable - hours, days) the 'user' in question loses its 'Managed Albums'. Suddenly the person logged in as that user is no longer able to edit - when one goes back to the User's tab the managed album or albums are no longer registered there.

We have been unable to see any rhyme or reason to this.

Over to you!

Hope you can help,
Richard

Comments

  • acrylian Administrator, Developer

    First time we hear about that issue. That would mean the database is updated as those settings are stored there.

    Please check your logs. And perhaps also look at the administrators table in the db. We had users with database issues causing duplicated entries.

    Although those were options and such if I remember correctly. Those were not our issue but somehow the tables were not correctly setup with unique columns.

  • This always happens after a database update.

    There is nothing to be seen in the debug log.

    In the administrators database table, can I presume that the managed album or albums is stored in the code of field 'rights' ?

    So, if the access to the managed album is lost at some update, then it is the 'rights' coding that is altered?

    Thank you,
    Richard

  • acrylian Administrator, Developer

    No, "rights" stores the rights level of the user. You cannot directly see the manage albums as they are connected via the "admin_to_object" table. Exception is the prime album if you have enabled that which has is id stored in the column of the same name.

  • OK, thank you - I see that.

    So judging from another of these incidents this morning, and looking at the database tables, that means that it is the admin_to_object entry that has been lost or removed when updating the database.

    I have asked the people involved to see if they can spot whether it is an update of images or of albums (or both) that is triggering this.

    We have not used 'prime' albums. I will check your tutorials to gen up on them.

    Thank you,
    Richard

  • Had a look - no, we don't use 'Primary' albums. We have many top level albums and need to switch from one to another as needed.

    We have been using the 'managed' albums to speed up using the backend and as we usually work only on one or sometimes two albums (when moving images or albums) this is very convenient for us and it has certainly speeded things up.

    Richard

  • This is still happening pretty frequently and is a nuisance.

    Presumably for the Administrator to lose its connection to the object_to_admin entry, the Administrator must be being saved as well as the album or image that has been edited?

    I wonder why that would be?

    If the user is not being saved again, how can the managed album be dropped from his admin_to_object table?

    I would very much like to get this sorted out.

    Thank you for your help so far.

    Richard

  • acrylian Administrator, Developer
    edited January 21

    It does not reset itself unless you are saving an admin or change rights. There is also the "prime album" that is created on user creation e.g. by the register_user plugin if enabled. That is not set via admin_to_object but within the adminstrators tables.

    But bottomline I have no idea why that would be happending if you don't have any actual error messages…

    What PHP version are you using, which of the two database handlers and what database?

    Also check the tables and look if the admin_to_object values match. It connects the id of the admin with the id and type of the object. Sadly you have to manually look up with the other tables if those match.

  • acrylian Administrator, Developer

    One thing although it makes no real sense if it works and then changes: Do you use the user_groups plugin? Make sure you have them assigned to a group that matches. For example the default group viewers has no management rights. Also there is a mistake - we never realized until now - that you can assign a user to more than one group which results in unclear rights.

  • Thank you - you asked:

    What PHP version are you using, which of the two database handlers and what database?

    PHP version: 8.2.27

    Database: MySQL 8.0.40
    Database handler: mysqli
    Database client: mysqlnd 8.2.27

    and the database tables are of type innoDB

    the admin_to_object appear to match with the administrator table and the users in the Users tab.

    this is an actual report (as an explanation - having converted from Menalto Gallery 2 we have many images that need rotating);::

    [Working on one album among those in my Managed Album] I rotated photos and had already done 5 pages (20 images each) in an album with 194 images . Going to the 6th page, I was reverted to this page [this was the Upload tab of the Admin section, with message: there are no albums to which you can upload] and I am no longer able to do any editing.

    I am still logged in, but have no editing rights. You'll see when you go to my username [the folder I was working on] is no longer ticked in the Managed Albums drop down list.

  • acrylian Administrator, Developer

    Okay, we haven't done real testing with MySQL 8 yet as our local server tool had some upgrade problems: Our server uses MariaDB with a matching version though MariaDB and MySQL now start to divide since the last upgrade but we haven't noticed anything wrong yet. We had fixed one MySQL 8 issue that was reported a while back but we cannot exclude that there is more…

    Thanks for a guide to possible reproduce this. Mysterious that you would get redirected to the upload tab when you are only rotating…

Sign In or Register to comment.