Skip to content

Conversation

@Koc
Copy link
Contributor

@Koc Koc commented Dec 28, 2025

This PR fixes a bug. Here a reproducer:

  1. Create e table
  2. Start import xlsx file
  3. Before actual importing - adjust settings of the created column, e.g. change "single line" type to "multi line"
  4. Start importing

Expected result: file imported

Actual result: there is an error

Details

Technical details

    Remote Address: 172.30.1.1
    Request ID: lu7YdLQLvAKMPV6mHYOD
    Type: Exception
    Code: 0
    Message: OCA\Tables\Dto\Column::__construct(): Argument #25 ($customSettings) must be of type ?string, array given, called in /var/www/html/apps/tables/lib/Dto/Column.php on line 46 in file '/var/www/html/apps/tables/lib/Dto/Column.php' line 11
    File: /var/www/html/lib/private/AppFramework/Http/Dispatcher.php
    Line: 150


Trace

#0 /var/www/html/lib/private/AppFramework/App.php(153): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Tables\Controller\ImportController), 'importUploadInT...')
#1 /var/www/html/lib/private/Route/Router.php(321): OC\AppFramework\App::main('OCA\\Tables\\Cont...', 'importUploadInT...', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#2 /var/www/html/lib/base.php(1061): OC\Route\Router->match('/apps/tables/im...')
#3 /var/www/html/index.php(25): OC::handleRequest()
#4 {main}


Previous

#0 /var/www/html/apps/tables/lib/Dto/Column.php(46): OCA\Tables\Dto\Column->__construct('Notes', 'text', 'long', false, 'This column was...', '', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, Array)
#1 /var/www/html/apps/tables/lib/Service/ImportService.php(584): OCA\Tables\Dto\Column::createFromArray(Array)
#2 /var/www/html/apps/tables/lib/Service/ImportService.php(356): OCA\Tables\Service\ImportService->getColumns(Object(OCA\Tables\Vendor\PhpOffice\PhpSpreadsheet\Worksheet\Row), Object(OCA\Tables\Vendor\PhpOffice\PhpSpreadsheet\Worksheet\Row))
#3 /var/www/html/apps/tables/lib/Service/ImportService.php(315): OCA\Tables\Service\ImportService->loop(Object(OCA\Tables\Vendor\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet))
#4 /var/www/html/apps/tables/lib/Controller/ImportController.php(118): OCA\Tables\Service\ImportService->import(36, NULL, '/tmp/php4PehuD', true, Array)
#5 /var/www/html/apps/tables/lib/Controller/Errors.php(23): OCA\Tables\Controller\ImportController->OCA\Tables\Controller\{closure}()
#6 /var/www/html/apps/tables/lib/Controller/ImportController.php(116): OCA\Tables\Controller\ImportController->handleError(Object(Closure))
#7 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(204): OCA\Tables\Controller\ImportController->importUploadInTable(36, true, '[{"titleRaw":"F...')
#8 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(118): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Tables\Controller\ImportController), 'importUploadInT...')
#9 /var/www/html/lib/private/AppFramework/App.php(153): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Tables\Controller\ImportController), 'importUploadInT...')
#10 /var/www/html/lib/private/Route/Router.php(321): OC\AppFramework\App::main('OCA\\Tables\\Cont...', 'importUploadInT...', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)
#11 /var/www/html/lib/base.php(1061): OC\Route\Router->match('/apps/tables/im...')
#12 /var/www/html/index.php(25): OC::handleRequest()
#13 {main}

This happens because FE send to BE "customSettings": {}, for adjusted columns

@Koc Koc requested review from blizzz and enjeck as code owners December 28, 2025 13:36
@Koc Koc added the bug Something isn't working label Jan 4, 2026
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
@Koc Koc force-pushed the bugfix/fix-import branch from 59e91c5 to e9f358c Compare January 7, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants