Page 2 of 2

Re: Picture showing in Gallery but not Gallery 2

Posted: Tue Jan 28, 2020 6:24 am
by flembobs
Sorry to sound like a broken record - but another one was lost:

https://www.contextfreeart.org/gallery2 ... esign/4123

Re: Picture showing in Gallery but not Gallery 2

Posted: Tue Jan 28, 2020 6:25 am
by flembobs
If I click 'view more' then it appears in that list. Just not on the main gallery.

Could it simply be I'm looking at a cached version of the page?

Re: Picture showing in Gallery but not Gallery 2

Posted: Wed Feb 05, 2020 9:01 pm
by MtnViewJohn
There is something weird going on in the Python backend when is queries the database of uploaded designs. The Python code queries the database and gets back strange results. If I hand enter the exact same SQL query into the Mysql command-line tool I get the expected results.

I think the issue is in the Python libraries, not my code. I will try updating to the latest versions to see if it helps. I may have to redo the back-end in PHP. The old PHP-based gallery is rock solid, it just doesn't have the modern look.

Re: Picture showing in Gallery but not Gallery 2

Posted: Tue Feb 11, 2020 9:25 am
by flembobs
Okay no problemo. Thanks for your dev time on the site.

Maybe it's a longshot but I know I had some problems with 'perfectly normal strings' in Python before.

In the end it came down to the encoding - the library I was using would break down with no helpful error message if the input file format wasn't UTF-8.

Re: Picture showing in Gallery but not Gallery 2

Posted: Fri Feb 28, 2020 11:19 pm
by MtnViewJohn
I think I may have fixed it. I'm using the mysql autocommit feature to talk to the gallery database but the python mysql connector library isn't setting autocommit up correctly. I have added code to explicitly turn on autocommit.