Announcement

#31 2021-07-11 00:23:39

erAck
Only trying to help
2015-09-06
2032

Re: [Plugin] Share Album

Probably simply because there is no Slovak sk_SK translation.
Compare with https://github.com/petitssuisses/piwigo … r/language
I never used the translation site so can't tell how to start a new translation.


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

Online

 

#32 2022-02-19 16:37:10

syscrusher
Member
2019-07-07
2

Re: [Plugin] Share Album

Good day!

I have found a bug when upgrading from Piwigo 11.x to 12.2 with this plugin installed. Fortunately, there is a very simple workaround. Although I found the problem while upgrading Piwigo core, I believe it would have been found earlier if I happened to visit the specific page after updating the plugin alone.

After upgrading, attempting to view the list of shared albums (from the admin page) throws an SQL error that the column "created_by" is not present in the "sharealbum" table.

The following SQL command works around the problem (but does not fix the code, of course):

Code:

ALTER TABLE sharealbum ADD COLUMN `created_by` MEDIUMINT(8) UNSIGHED DEFAULT NULL;

I have shown the SQL keywords in uppercase for readability, but they are case-insensitive.

I did not patch the code because my PHP coding skills are rusty. I did note that the source code has this column present for a new installation of the plugin. It just needs to be added during the plugin update callback.

Offline

 

#33 2022-02-22 22:20:52

erAck
Only trying to help
2015-09-06
2032

Re: [Plugin] Share Album

Note that the plugin does add the `created_by` column in an update installation if it is not present, see
https://github.com/petitssuisses/piwigo … s.php#L112

Also note that it should had created the sharealbum_powerusers group the same, see right above at
https://github.com/petitssuisses/piwigo … s.php#L106
and group sharealbum further above.

Earlier versions than 12.2 of the plugin did things a bit differently, see this diff
[Github] piwigo-ShareAlbum commit 95bde33a
but then again even if that failed for you the latest update to 12.4 should had added groups and columns.

However.. in your code example the table name sharealbum must be prefixed with the global Piwigo table name prefix of the installation, default 'piwigo_' so then should be piwigo_sharealbum or whatever the actual prefix is (might be empty in your case). Also, the attribute should be UNSIGNED instead of UNSIGHED.


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

Online

 

Board footer

Powered by FluxBB

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