forum.coppermine-gallery.net

Support => cpg1.6.x Support => cpg1.6 miscellaneous => Topic started by: moklein on July 14, 2018, 11:19:47 am

Title: thumbnail.php => blank page output
Post by: moklein on July 14, 2018, 11:19:47 am
I upgraded to the latest 1.6 and everything works fine except when I click on an album thumbnail.
Then I am left with a blank page. It does work when I am logged in, but it does not work for guests.
Anybody any idea where I should look for a fix...?
thanks
Martin
Title: Re: thumbnail.php => blank page output
Post by: ron4mac on July 14, 2018, 02:23:35 pm
Assuming here the site is http://www.verwonderwolken.nl

There doesn't seem to be a problem with your theme, so I would guess there is a problem with one of your plugins. In the Plugin Manager, you can disable individual plugins. Disable all non-core plugins to see if it then works okay. Enable one at a time until you find the problem one. Probably easiest to do with 2 different browsers ... one where you are admin to manage the plugins, the other where you are a guest.
Title: Re: thumbnail.php => blank page output
Post by: moklein on July 14, 2018, 03:29:34 pm
You assumed right, sorry I forgot to mention it. There is another one at www.marcar-marqant.nl, it has the same setup and the same problem. I had all plugins uninstalled when I upgraded, so should not be a plugin causing this, but to be sure I uninstalled them again, same problem. I do shortly see the word 'loading...' on the screen, but it vanishes and leaves the screen blank.
thanks, Martin
Title: update thumbnail.php => blank page output
Post by: moklein on July 14, 2018, 06:58:33 pm
If I leave out the ?album=x in the url http://www.verwonderwolken.nl/thumbnails.php?album=x,
them I do get the header and footer on screen, just nothing in between.
Title: Re: thumbnail.php => blank page output
Post by: ron4mac on July 15, 2018, 12:26:42 am
At the bottom of the config items, set debug mode for all. See if it shows any error info when accessed as guest.

Did you do the upgrades using the installer stub?  Did you choose mysqli for database access (or mysql or PDO/mysql)?
Title: Re: thumbnail.php => blank page output
Post by: ron4mac on July 15, 2018, 05:17:17 am
I thought about this more...

There are likely mysql calls in your curve derived themes.

In two locations in your theme.php file you need to make changes...

change:
Code: [Select]
                if (mysql_num_rows($user_albums)) {to:
Code: [Select]
                if ($user_albums->numRows() > 0) {
and change:
Code: [Select]
                if (mysql_num_rows($public_albums)) {to:
Code: [Select]
                if ($public_albums->numRows() > 0) {

You should really keep installed another standard theme that comes (and is updated) with CPG. It helps to identify theme problems when they occur.
Title: Re: thumbnail.php => blank page output
Post by: moklein on July 15, 2018, 10:47:12 am
Since I am working with mysql I just changed 'mysql' to 'mysqli' and it all worked again
(or would changing it the way you described be better practice ?). I forgot to check for
updates in Curve and just reinstalled the old (responsive) version, would have taken me
ages to find this out since debug did not show any errors, you're a star, thanks very much
for the help :-).
kind regards,
Martin
Title: Re: thumbnail.php => blank page output
Post by: ron4mac on July 15, 2018, 02:38:06 pm
Even though it is working for you, changing it as you did is not the correct way to do it. It is passing mysqli a foreign object.

For best compatibility, change:
Code: [Select]
    mysql_num_rows($xxxx_albums)to:
Code: [Select]
    cpg_db_num_rows($xxxx_albums)
Sorry ... I should have instructed you to use that method in the first place.
Title: Re: thumbnail.php => blank page output
Post by: moklein on July 16, 2018, 08:54:13 am
See what you mean, changed all instances.
Thanks for all your help.
best wishes,
Martin