modufolio / Koken-App

38 stars 6 forks source link

Albums of album_type = 1 not displaying content #25

Open GuyMP opened 6 months ago

GuyMP commented 6 months ago

A Koken web-site that had content nested under headings was working under the last official Koken release and is not working correctly with patch 1.2.0. Specifically, collections with album_type = 1 do not display content in koken/admin/library:

01-Library-View

Nor on the web-site:

02-Web-View

I checked the database using MySQL and those albums that used to be there were still listed:

03-Data

I carried out a test, adding a new "set" (album_type = 2) with a new "album" (album_type = 0) nested within it, see:

04-Test

When I clicked on the new album "0409" all the missing content re-appeared, see:

05-Reappearance

When I clicked on one of the album_type = 1 items (either "Portfolio" or "Assignments") all the content that should be listed under those headings disappeared again.

My web-site worked fine with the last patch I downloaded from you on 6 August 2022 (1.1.3) and stopped working when my web host upgraded from PHP 7.4 to 8.1.

Action taken by me:

  1. Followed instructions to upgrade to 1.2.0. (no change).
  2. Cleared all browser history and caches (no change).
  3. Tried a different browser (no change).
  4. Deleted the entire koken/storage/cache folder and cleared browser history again (no change).
  5. Upgraded web host from PHP 8.1 to 8.3 and cleared all histories and caches (no change).

I am enormously appreciative of the work done to keep Koken alive and would be hugely grateful for a fix for this, too. I hope I have provided enough for you to replicate it. If you have questions, please don't hesitate to ask.

Guy Montagu-Pollock.

modufolio commented 6 months ago

Hi Guy Montagu-Pollock,

Thank you for your kinds words!

I'm sorry, I can't reproduce the issue. Please first make a database backup and try to update the portfolio album type from 1 to 2.

UPDATE koken_albums SET album_type = '2' WHERE album_type = '1';

GuyMP commented 6 months ago

Dear Maarten,

Thank you for such a quick reply. I'm sorry you couldn't replicate the issue. I have changed the album types from 1 to 2 as you suggested. This changed their icon to the "set" icon in Library view but did not cure or improve the fault I am experiencing.

I suppose it is possible that my data has become corrupt in some way. I'm checking and trying to understand the tables now. If worst comes to the worst, I shall try rebuilding the site again — which I would have to do anyway if I switched from Koken to something else. I'd much rather keep Koken!

Yours, Guy.

GuyMP commented 6 months ago

Further to this, and having backed up the database, I went to clear the empty test set and album I had created above. I had trouble emptying the trash, left it spinning for an hour with no change. Tried another browser: same thing. I checked the database, deleted lines in koken_trash manually, and checked koken_albums where deleted = 1. There were approximately a dozen entries with deleted = 1. After deleting all of them manually koken/admin and the site started behaving normally.

I am at a loss to explain this but I'll take this stroke of luck!

Guy.

GuyMP commented 6 months ago

As an experiment, returned those collections to album_type = 1 and the fault came back exactly. Changed them to album_type = 2 (and flushed the caches) and the problem went away. So:

Guy.