K2->k3 superslow thumb generation?

What are you using for a local server, and what version of PHP? The requirements for php where much lower for Kirby 2. Is there a chance you using a version that is too old both locally and on remote for this site?

Server version: Apache/2.4.29 (Ubuntu)
PHP 7.2.24-0ubuntu0.18.04.3

No, I don’t think that is the case :thinking:

Hm, if the local setup is identical for this site and the others, I wonder if there is any legacy code interfering. Hard to tell.

I would maybe start out with the Plainkit and piece the site back together carefully, a template at a time and until you hit the problematic code.

1 Like

Well, that could be, yes.

But before the upgrade the site did not use controllers, routes, plugins or anything custom for that matter. There were and still are several js (jquery, jscrollpane and others) but shouldn’t affect panel image load as far as I can see.

I added a site controller to build some collections and the plugins which are now out of the way, and a blueprints/blocks folder and a snippets/blocks folder too.

So as far as I can see, any problematic code should be in templates or snippets, but how could that be giving problems panel side?

I just hope this is not a silly mistake of mine somewhere :man_facepalming:

@texnixe are there any changes in .txt file syntax from k2 to k3 ?

Other things that come to mind

  • Blueprints had php extension, renamed them to yml
  • Also moved them to /pages/ subfolder except site as instructed
  • I turned all pages and files setting into sections etc
  • Num moved to subpages
  • Ran the script to rename all folders into using underscore
  • Had to change many date() to toDate()
  • Also kirbytext(…) to ->kirbytext()

… and I’d say that’s abou it :thinking:

Have you checked console and network tab for any errors etc.?
Going to get some :sleeping: :sleeping_bed: now, tomorrow is another day…

1 Like

Its a needle in a haystack really, all we can do is guess. The method above is they way I do my K2 upgrades, becuase its easier to see problems that way. The panel will whoops at you at each each error. I personally would never swap out the kirby folder, and then set about changing every thing. I always fold the old code in piece by piece into the Plainkit, and then bring in all the content when i know it works.

I appreciate the advice @jimbobrjames but I did not code this site and the scope of the task I got did not consider a piece by piece re-building of the site. I really hope it does not come to that!

@texnixe no errors on console and when uploading an image via panel I get a plain 200 on the network tab, Guten Nacht

One thing which may be relevant is that this site has quite a lot of images… This are the stats of the content folder (some mistakenly named files there I see):

  1 bak191204
  1 DS_Store
  1587 jpg
  1 json
  57 pdf
  8 png
  1954 txt
  1 webjpg

Well I tried removing ALL content, and I still get the the same behaviour when uploading a panel image.

Hm, maybe you want to send me the project and I’ll test if I have the same issue in my environment and have a look at the code to see if I can find anything.

Thank you, I’ll do so, what would be your prefered method to transfer the files ?

You can send me a download link to a zip file, doesn’t matter if you use Dropbox, your own cloud or whatever. Just keep in mind that I won’t have time to have a closer look before tonight.

1 Like

github repo would work too ?

Of course!

1 Like

I think you’ve already seen it but I sent an invite through Github. Thanks again.

Yes, thank you. I’ve downloaded the project and having a look. I can see the effect, images are uploaded pretty quick and the thumbs are created correctly but not shown in the Panel without reloading. Haven’t found the issue yet and probably have to postpone till tomorrow.

1 Like

Ok, I finally found the culprit. I knew it would be something like that but overlooked it in the first round and looked in the wrong places. You have an empty first line in index.php which causes the issue. Remove that and you can be a happy bunny again.

3 Likes

Unbelievable!

Why would an empty first line in index.php produce this ?

Thank you very much for finding out.

image

php includes like the config are prone to add whitespace before the actual html doctype declaration and that might cause an error.

1 Like