Closed Jerome-Herbinet closed 1 year ago
It occurs under : Nextcloud 24.0.0 + "Temporary files lock" 24.0.0 + "Text" 3.5.1 It does not occur under : Nextcloud 21.0.9 + "Temporary files lock" 20.1.0 + "Text" 3.2.0 Nextcloud 22.2.7 + "Temporary files lock" 20.1.0 + "Text" 3.3.1 Nextcloud 23.0.4 + "Temporary files lock" 20.1.0 + "Text" 3.4.1
It is difficult in this story to know whether the problem is with "Temporary Files Lock", "Nextcloud Text" or deeper layers of Nextcloud. Thank you in advance for the time you could give to solve this problem. What's annoying is that this very interesting and relevant feature was really highlighted when Nextcloud 24 was publicly unveiled...
Hello, while trying to debug this feature with Jérôme, I've come across some issues in the occ command.
When the file is unlocked, there is no problem :
[root@nextcloud](/var/www/html/nextcloud/)# sudo -u nginx php occ files:lock 1213 --status
File #1213 is not locked
But after being locked, the same occ command gives a result then an error :
[root@nextcloud](/var/www/html/nextcloud/)# sudo -u nginx php occ files:lock 1213 --status
File #1213 is locked by user
An unhandled exception has been thrown:
Error: Call to undefined method OCA\FilesLock\Model\FileLock::getCreation() in /var/www/html/nextcloud//apps/files_lock/lib/Command/Lock.php:171
Stack trace:
#0 /var/www/html/nextcloud//apps/files_lock/lib/Command/Lock.php(137): OCA\FilesLock\Command\Lock->getStatus(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 1213)
#1 /var/www/html/nextcloud//3rdparty/symfony/console/Command/Command.php(255): OCA\FilesLock\Command\Lock->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /var/www/html/nextcloud//core/Command/Base.php(168): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/nextcloud//3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/nextcloud//3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OCA\FilesLock\Command\Lock), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/nextcloud//3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/nextcloud/nc24.test.arawar.f/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/nextcloud//console.php(99): OC\Console\Application->run()
#8 /var/www/html/nextcloud//occ(11): require_once('/var/www/html/n...')
Best regards,
I found the bug.
it can be solved by renaming getCreation()
to getCreatedAt()
in /var/www/html/nextcloud//apps/files_lock/lib/Command/Lock.php:171
$output->writeln(
// ' - Locked at: ' . date('c', $lock->getCreation())
' - Locked at: ' . date('c', $lock->getCreatedAt())
);
Hello,
Here is an issue found on Nextcloud NC 24.0.0 with Temporary files lock 24.0.0.
Problem reproduction stage :
PS : You will find that the problem remains the same, even if you have not shared the file with anyone.
Unless I had not understood some of the subtleties of the tool, it seems to me that the tool is a bit overzealous.
I remain at your disposal for any further technical information.
Best regards, Jérôme