phpBB Gallery

New users after upgrade from 1.1.6 can't create own album - phpBB Gallery

New users after upgrade from 1.1.6 can't create own album

by 5hocK » Fri Nov 17, 2023 5:48 pm

Hi
Original gallery installed on 3.0.x, upgraded to 3.3.x
10.3.39-MariaDB
PHP 8.2

Users registered from before the gallery upgrade to 3.3.x (when the gallery was 1.1.6) can create their own personal albums in the UCP. Users registered after the upgrade cannot*. Clicking Create personal album
create_personal_album.PNG
Doesn't result in an album being created so no sub albums can be created either.

*What does happen is however many times a User clicks Create personal album this happens (user is called Hcaptcha)
multiple_albums.PNG
In the acp under Cleanup gallery, if I try to delete the personal album that was 'created'
cleanup_gallery.PNG
I get this warning before trying to delete

Code: Select all

[phpBB Debug] PHP Warning: in file [ROOT]/ext/phpbbgallery/acpcleanup/acp/main_module.php on line 278: Undefined array key "CLEAN_GALLERY_CONFIRM"
When I clck Yes to actually delete
clean_gallery_yes.PNG
clean_gallery_yes.PNG (11.09 KiB) Viewed 175 times
I get this error and no personal albums have been deleted.

Code: Select all

Fatal error: Uncaught Error: Call to undefined method phpbbgallery\core\album\album::get_public() in C:\xamppp\htdocs\forum\ext\phpbbgallery\acpcleanup\cleanup.php:229 Stack trace: #0 C:\xamppp\htdocs\forum\ext\phpbbgallery\acpcleanup\acp\main_module.php(185): phpbbgallery\acpcleanup\cleanup->delete_pegas(Array, Array) #1 C:\xamppp\htdocs\forum\ext\phpbbgallery\acpcleanup\acp\main_module.php(26): phpbbgallery\acpcleanup\acp\main_module->cleanup() #2 C:\xamppp\htdocs\forum\includes\functions_module.php(676): phpbbgallery\acpcleanup\acp\main_module->main('\\phpbbgallery\\a...', 'cleanup') #3 C:\xamppp\htdocs\forum\adm\index.php(81): p_master->load_active() #4 {main} thrown in C:\xamppp\htdocs\forum\ext\phpbbgallery\acpcleanup\cleanup.php on line 229
Any help appreciated.
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Sat Dec 30, 2023 1:52 pm

Any ideas Satanasov? :)
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Sat Aug 10, 2024 12:32 am

Lock the forum and then make a backup of the database.
Find user ID.
You all have the album IDs.
Go to the database and find:
*phpbb_gallery_users and delete the user's record based on the user ID.
*phpbb_gallery_albums and delete all records of the user's album IDs based on the user ID.
* phpbb_gallery_images and delete all records of the user's image IDs based on the user ID.
Then clear the cache in your forum.
Then check Gallery Cleanup again to see if the user's albums and/or images are now gone.
This way I defy the error message. :mrgreen:
I tested it this way and it worked for me.
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Mon Aug 12, 2024 3:17 pm

Thanks archiver, this cleans up the gallery nicely but there's still the main problem of
5hocK wrote: Users registered from before the gallery upgrade to 3.3.x (when the gallery was 1.1.6) can create their own personal albums in the UCP. Users registered after the upgrade cannot
The forum was 3.0.12 with 1.1.6 gallery.

New users (after forum upgrade) can click Create personal album in the ucp and no user ID is created inphpbb_gallery_users but multiple albums will show in the gallery depending how many times the user clicks the button.

Users who registered while forum was 3.0.12 can click Create personal album and all works as it should.
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Tue Aug 13, 2024 5:32 am

5hocK wrote:..... Users who registered while forum was 3.0.12 can click Create personal album and all works as it should.
What exact phpBB version were you using when you upgraded the gallery from gallery version 1.1.6 to gallery version 3.3.0?
phpBB Gallery upgrade from 1.1.x to 1.2+
phpBB Gallery upgrade from 1.1.x to 1.2+
So ... you have old gallery (1.1.6 or something older) and you want to migrate from phpBB 3.0.x to 3.1.x?
The error may have occurred because you upgraded from Gallery version 1.1.6 to Gallery version 3.3.0 using a newer phpBB version (for example phpBB version 3.3.12).
The upgrade described here only applies to phpBB 3.0.x to 3.1.x, not from phpBB 3.0.x to phpBB 3.3.12. The x after the second dot only applies to the following versions phpBB 3.0.x to 3.1.x or for example phpBB 3.0.12 to 3.1.12.
If I were you, I would first update from phpBB version 3.0.x to the next phpBB version and at the same time install the appropriate phpBB Gallery version (phpbbgallery-stable-1.2.0.02).
So, little by little, until the latest phpBB Gallery version 3.3.0 matches the latest phpBB version 3.3.12. Of course, the respective php version and database version should always be adjusted to the individual update and everything should be tested thoroughly after each individual update.
5hocK wrote:.....
New users (after forum upgrade) can click Create personal album in the ucp and no user ID is created inphpbb_gallery_users but multiple albums will show in the gallery depending how many times the user clicks the button.
The user ID of the gallery is taken from phpBB and should also be in the database under “phpbb_gallery_users” under “user_id” – the corresponding “personal_album_id” is also in the same line.

Also look in the database under “phpbb_gallery_albums” under “album_user_id” – the corresponding “album_id” is also in the same line.

Search for a user’s image in the database under “phpbb_gallery_images” under “image_id” – the corresponding “image_user_id” and the “image_username” are also in the same line.
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Tue Aug 13, 2024 7:35 am

archivar wrote:The user ID of the gallery is taken from phpBB
I should have said
New users (after forum upgrade) can click Create personal album in the ucp and no user ID is created the user id (created at registration) does not populate in phpbb_gallery_users but multiple albums will show in the gallery depending how many times the user clicks the button.

The gallery was 1st installed in 2012 and now has over 7000 images. All upgrades to the board and the gallery in the 3.0.x branch were done by me with no errors. I upgraded the board to 3.x.x in June 2022 - not sure what version that would be. Satanasov did the update to the gallery himself in July 2022 but I never noticed new users couldn't create personal albums until a few months later.
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Tue Aug 13, 2024 9:02 am

5hocK wrote:....Satanasov did the update to the gallery himself in July 2022 but I never noticed new users couldn't create personal albums until a few months later.
When did you last update the gallery and phpBB?
phpBB version 3.3.7 has been available since July 2022.
The phpBB Gallery 3.3.0 has also been available since at least July 2022 and unfortunately has not received any new version numbers after several updates.
The last changes to the gallery were made available on July 6, 2023 and is also called phpBB Gallery 3.3.0.
I have installed all the changes in phpBB Gallery 3.3.0 from the beginning and have always managed to update, apart from a few minor issues with the gallery.
Just to test it out, create a test account for yourself by registering as a new user and testing what happens when you create a personal album in the gallery in the test account.
And then check which gallery data is in the database via your test account.
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Tue Aug 13, 2024 10:32 am

Board is updated as each new version is released. I remember updating the gallery last year from github, along with some minor html edits that I believe you posted in a topic somewhere.
archivar wrote: Just to test it out, create a test account for yourself by registering as a new user and testing what happens when you create a personal album in the gallery in the test account.
1st post shows a test account called Hcaptcha.

I've redone a test with a user called restest with id 6522. Clicked create personal album, screen refreshes but nothing in ucp says theres a personal album created.
6522.PNG
6522.PNG (8.33 KiB) Viewed 55 times

I've sorted user_id in number order in database phpbb_gallery_users (no 6522)
missing_no_6522.PNG
missing_no_6522.PNG (20.59 KiB) Viewed 55 times

phpbb_gallery_albums
phpbb_gallery_album.PNG
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Tue Aug 13, 2024 11:44 am

Have you also used these functions in the admin area?
Resynchronise image counts
Only existing images will be taken into consideration.

Resynchronise personal albums

Resynchronise statistics

Refresh “Last image“

Purge the cache
If you use the Thumbnail Cache feature you must clear your thumbnail cache after changing your thumbnail settings in “Gallery configuration “to make them regenerated.

Resync personal albums to profile fields
This action will resync all top-level personal albums as contact based custom profile field.
WARNING! If you have too many top-level personal albums this could take some time!
And finally, always clear the forum cache and browser cache!
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Tue Aug 13, 2024 12:25 pm

Yes, done all that many times.
It's odd that old users and my old test user from 3.0.x days can create personal albums, just not anyone new from july 2022 onwards. Thanks for your help archiver but I think we've hit a dead end!
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by Satanasov » Tue Aug 13, 2024 12:32 pm

Do you have access to error log? Please try creating album and see is there any errors in your Web server error log.
For list of all my extensions go to https://github.com/satanasov
If you want custom functions in some of my products - PM me and we will discuss it.
Satanasov
Registered User
Posts: 1312
Joined: Sun Jul 29, 2012 5:48 am
Name: Stanislav Atanasov

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Tue Aug 13, 2024 12:38 pm

And what if you open a personal album for new users in the admin area?
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Tue Aug 13, 2024 1:28 pm

Creating a personal album does not create an error log, but there is this error which repeats over and over again.

Code: Select all

[12-Aug-2024 12:56:06 America/New_York] PHP Fatal error:  Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /home/jsofzone/public_html/ext/phpbbgallery/core/controller/image.php:1265
Stack trace:
#0 /home/jsofzone/public_html/ext/phpbbgallery/core/controller/image.php(1265): array_keys(NULL)
#1 /home/jsofzone/public_html/ext/phpbbgallery/core/controller/image.php(452): phpbbgallery\core\controller\image->load_users_data()
#2 /home/jsofzone/public_html/vendor/symfony/http-kernel/HttpKernel.php(151): phpbbgallery\core\controller\image->base('926', 1)
#3 /home/jsofzone/public_html/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(phpbb\symfony_request), 1)
#4 /home/jsofzone/public_html/app.php(35): Symfony\Component\HttpKernel\HttpKernel->handle(Object(phpbb\symfony_request))
#5 {main}
  thrown in /home/jsofzone/public_html/ext/phpbbgallery/core/controller/image.php on line 1265
archivar wrote: And what if you open a personal album for new users in the admin area?
How do I do that?
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK

Re: New users after upgrade from 1.1.6 can't create own albu

by archivar » Tue Aug 13, 2024 1:49 pm

5hocK wrote:
archivar wrote: And what if you open a personal album for new users in the admin area?
How do I do that?
It's very easy.
admin2-phpBB-Gallery.jpg
Best regards, Archivar
Sorry for my English Google Translation.
User avatar
archivar
Registered User
Posts: 299
Joined: Sun Sep 13, 2009 1:00 pm
Location: Deutschland

Re: New users after upgrade from 1.1.6 can't create own albu

by 5hocK » Tue Aug 13, 2024 2:06 pm

Same problem, it says
cpa.PNG
cpa.PNG (2.83 KiB) Viewed 36 times
but in ucp, still says this
mpa.PNG
mpa.PNG (6.76 KiB) Viewed 36 times
No user id in phpbb_gallery_user, but there is an album in phpbb_gallery_albums - so same as trying in the ucp...
5hocK
Registered User
Posts: 3147
Joined: Wed Nov 23, 2011 7:00 pm
Location: UK