Hi @webmasterdistrict10nia
The plugin looks abandoned, I don’t think the authors will read this thread.
I had the same problem with PHP 8.
You can fix it by moving DG_Gallery::init(); to the bottom of the file in document-gallery-3/inc/class-gallery.php. It works for me after moving that line of code to the bottom.
Thanks @giuse, that edit fixed the issue on PHP 8 for my website as well.
You are welcome @scshca. I’m happy that it was useful.
Jose, where do I find that code in order to move it? I am not an IT guy but have friends that are and are willing to help.
Thanks,
Mark
Thanks for the patch, @giuse!
That fixed it for me in php8 as well. 🙂
Vi
Where do I find that code? In the “details” section of the DG plugin description bar when looking at the Plugin description? In the sites webserver?
Thanks,
Mark
Hi @webmasterdistrict10nia
You can fix it by moving DG_Gallery::init(); to the bottom of the file in document-gallery-3/inc/class-gallery.php. It works for me after moving that line of code to the bottom.
So, the file in document-gallery-3/inc/class-gallery.php.
I suggest hiring a developer and giving them the link to this thread.
If you or your friends don’t know how to find and edit that file better you hire a developer.
You are welcome @viwickam !
Hi Jose,
You can fix it by moving DG_Gallery::init(); to the bottom of the file in document-gallery-3/inc/class-gallery.php. It works for me after moving that line of code to the bottom.
I did that, still the same with my document gallery, wordpress 6.1.1 and tested with php 8, php 8.1 and php 8.2, if i return to php 7.4 then it works with the edited class-gallery.php as well, no need to copy original class-gallery.php back to inc folder. How i can fix it, so it works with newer php?
Aadress where it does not work is here: https://hingetee.ee/dokumendid/
Thank you,
Marx
Another PHP 8 fix was changing the order of parameters in inc/class-gallery.php:544
to implode( ', ', $ids )
.
Shame the project was abandoned, does what I needed really well.