Broken numbering with file.sort

Hi there, I have an issuu where the numbering is all broken after I upload an image on the local version of my website (via laravel). Any clue what might be the cause of it and how to prevent it?

I can’t recount the number of time I resorted them individually by going into each .txt file :weary:!

How many images are there by now? I remember you had that issue before…

Manually renumbering is definitely a pain…

Hey @texnixe, it is indeed the same issuu. I’m at around 111 images so far.

What are your php.ini settings, maybe you have to increase max_execution_time?

Changed max_execution_time from 30 to 60
I also updated nains, laravel & valet. No more luck.

Could it be related to where Kirby add the sort info? Sometimes at the beginning of the text file, other time at the end?
Capture d’écran, le 2021-01-07 à 14.34.30

Capture d’écran, le 2021-01-07 à 14.34.35

Or could it be related to the fact that it doesn’t add a number when adding a new file? Couldn’t it be added at the end?

New files are not automatically sorted, you always have to sort them manually after upload to where you want them. The alternative would be to use a hook that does the sorting for you automatically when a new file is uploaded.

I’d increase the execution time even more just for testing, set it to something like 360.

No more luck with 360. Here’s a recording of what I’m doing. I don’t know if I’m not waiting enough maybe? Here’s a screen grab of what I’m currently doing

And still, it works on the online version. Maybe I’ll just go that way, and then sync locally afterward :confused:

Are you using the latest version of Kirby?

Which PHP version do you use locally?

Could you send me a copy of your current project status? I could then test on my Mac with Laravel if I run into the same issues.

Kirby 3.5.0
As for PHP, I’m not sure… I get either

% php artisan --version
Laravel Framework 6.11.0


% php -v
PHP 7.4.1 (cli) (built: Dec 18 2019 14:46:18) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.1, Copyright (c), by Zend Technologies

A follow-up. The sorting works great with on my install remote installation and on @texnixe ’s installation. The error then probably comes from my laravel/valet setup ¯_(ツ)_/¯

Since I use Laravel Valet as well, maybe uninstall your Laravel setup and reinstall again.

Just reinstalled the whole thing, alas, it still behaves the same way. :neutral_face:
The fix I’ll use is I’ll just update this part of the website on the remote install, and repatriate the folder on my local machine.