Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No data of existing tables after update #999

Open
Jednadvacet opened this issue Apr 25, 2024 · 28 comments
Open

No data of existing tables after update #999

Jednadvacet opened this issue Apr 25, 2024 · 28 comments
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working

Comments

@Jednadvacet
Copy link

Steps to reproduce

  1. Update Tables to 0.7.0. (NC 28.0.4, 29.0.0.)
  2. Tables -> Select a table
  3. Cry

Expected behavior

Table data views should be available.

Actual behavior

After Tables app update to 0.7.0. no table data to display. 0, none.

Log:
InternalError, No column found to build filter with for id -2
An internal error or exception occurred: No column found to build filter with for id -2

Help, please.

Tables app version

0.7.0.

Browser

Edge

Client operating system

No response

Operating system

Ubuntu 20.04

Web server

Nginx

PHP engine version

PHP 8.1

Database

MariaDB

Additional info

No response

@Jednadvacet Jednadvacet added 0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working labels Apr 25, 2024
@osm-frasch
Copy link

We have the same problem. I opened a bug report at the same time. I think this can be merged

@Jednadvacet
Copy link
Author

Sure!

@GoOz
Copy link

GoOz commented Apr 25, 2024

Got the same issue there. I don't have access to the DB myself but do you know if the data is lost or is it just the app failing the DB request?

@juliushaertl
Copy link
Member

Can you paste the full raw json content of the error message, however just from the message it looks like #998 and it looks like it is just failing to list the tables due to a somewhat strange view filter in place

@Jednadvacet
Copy link
Author

This is mine:

{"reqId":"7nwHGp5F7xMealyHHIVM","level":3,"time":"2024-04-25T09:34:34+00:00","remoteAddr":"213.250.193.178","user":"ondra","app":"tables","method":"GET","url":"/apps/tables/table","message":"No column found to build filter with for id -2","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.0.0","version":"29.0.0.19","exception":{"Exception":"OCA\Tables\Errors\InternalError","Message":"No column found to build filter with for id -2","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/tables/lib/Db/Row2Mapper.php","line":263,"function":"getFilter","class":"OCA\Tables\Db\Row2Mapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Db/Row2Mapper.php","line":241,"function":"getFilterGroups","class":"OCA\Tables\Db\Row2Mapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Db/Row2Mapper.php","line":143,"function":"addFilterToQuery","class":"OCA\Tables\Db\Row2Mapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Db/Row2Mapper.php","line":827,"function":"getWantedRowIds","class":"OCA\Tables\Db\Row2Mapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Service/RowService.php","line":535,"function":"countRowsForView","class":"OCA\Tables\Db\Row2Mapper","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Service/ViewService.php","line":413,"function":"getViewRowsCount","class":"OCA\Tables\Service\RowService","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Service/ViewService.php","line":90,"function":"enhanceView","class":"OCA\Tables\Service\ViewService","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Service/TableService.php","line":227,"function":"findAll","class":"OCA\Tables\Service\ViewService","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Service/TableService.php","line":149,"function":"enhanceTable","class":"OCA\Tables\Service\TableService","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Controller/TableController.php","line":39,"function":"findAll","class":"OCA\Tables\Service\TableService","type":"->"},{"file":"/var/www/html/nextcloud/apps/tables/lib/Controller/Errors.php","line":16,"function":"OCA\Tables\Controller\{closure}","class":"OCA\Tables\Controller\TableController","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/apps/tables/lib/Controller/TableController.php","line":40,"function":"handleError","class":"OCA\Tables\Controller\TableController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":232,"function":"index","class":"OCA\Tables\Controller\TableController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":138,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":338,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1050,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":49,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/tables/lib/Db/Row2Mapper.php","Line":276,"message":"No column found to build filter with for id -2","exception":[],"CustomMessage":"No column found to build filter with for id -2"},"id":"662a42782dffb"}

@daCaPo
Copy link

daCaPo commented Apr 25, 2024

Same issue here.

@JohannesTeichert
Copy link

JohannesTeichert commented Apr 25, 2024

same issue here any chance the data can be recovered? 😬

This is the log I got in nextcloud logging section:

Exception
Repair step 'OCA\Tables\Migration\NewDbStructureRepairStep' can't be instantiated: Could not resolve OCA\Tables\Db\RowMapper! Class "OCA\Tables\Db\RowMapper" does not exist
Exception thrown: Exception

@GoOz
Copy link

GoOz commented Apr 25, 2024

@JohannesTeichert from what I understood and what is said in #998 the data is indeed still there, so no loss.

@daCaPo
Copy link

daCaPo commented Apr 25, 2024

See my #998 (comment) (and maybe merge #988 and #999?)

@JohannesTeichert
Copy link

I updated my initial comment with the log from the Log viewer:

This is the log I got in nextcloud logging section:

Exception
Repair step 'OCA\Tables\Migration\NewDbStructureRepairStep' can't be instantiated: Could not resolve OCA\Tables\Db\RowMapper! Class "OCA\Tables\Db\RowMapper" does not exist
Exception thrown: Exception

are we having the same problem?

@ostasevych
Copy link

ostasevych commented Apr 25, 2024

All my rows from the table have gone (!!!) after update to 0.7.0. These are around 250 records. What to do to bring them back? Is it possible to downgrade?

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

@Jednadvacet
Copy link
Author

Jednadvacet commented Apr 25, 2024 via email

@rakurtz
Copy link

rakurtz commented Apr 26, 2024

occ tables:legacy:transfer:rows --all

works perfectly

@Morethanevil
Copy link

All my rows from the table have gone (!!!) after update to 0.7.0. These are around 250 records. What to do to bring them back? Is it possible to downgrade?

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

Thank you so much 🥹

You saved a lot of work

@clatoverada
Copy link

clatoverada commented Apr 27, 2024

occ tables:legacy:transfer:rows --all

Sadly, this command did not solve the problem for me. Tables are still not displayed. Creating new tables also fails.

UPDATE: After restarting the server, the tables are accessible again. :-)

@seindal
Copy link

seindal commented Apr 30, 2024

After upgrading to 0.7.1 all my tables are gone. The occ command above did nothing.

I haven't found anything relevant in the log, only a couple of "Try to set no user in context, but request is not allowed" but one was from before the upgrade.

@90madness
Copy link

Yes, Same here. After Update to 0.7.1 all tables are empty. using Nextcloud All in One on Debian

@NL-CCMLM
Copy link

NL-CCMLM commented May 3, 2024

occ tables:legacy:transfer:rows --all

worked for us, without restart, but ....
some rows behave strangely... but no data was lost !
Anyway, that's a big thanks you for the tip and ... the app !

@ostasevych
Copy link

The most strange thing observer by me is loosing date/time format. The rows are not sorted by date anymore :(

@b108
Copy link

b108 commented May 5, 2024

Same issue here.

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

thank you!

@Throntorus
Copy link

Throntorus commented May 5, 2024

All my rows from the table have gone (!!!) after update to 0.7.0. These are around 250 records. What to do to bring them back? Is it possible to downgrade?

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

Unfortunatelly i got "Look for tables Error while fetching tables. Will aboard." - anyone else wiht this problem?

@Blackfire-dev
Copy link

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

Thank you so much. I nearly nearly had a heart attack. This is worked for me on 7 tables with over 100 records between them.

@ostasevych
Copy link

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

Thank you so much. I nearly nearly had a heart attack. This is worked for me on 7 tables with over 100 records between them.

Check data consistency. I have lost sorting by date, eg.

@Blackfire-dev
Copy link

UPD: This command fixed the issue:

occ tables:legacy:transfer:rows --all

Thank you so much. I nearly nearly had a heart attack. This is worked for me on 7 tables with over 100 records between them.

Check data consistency. I have lost sorting by date, eg.

I have just checked, fortunately I haven't had any loss or data or sorting options. Thank you for the heads up.

@Taxicletter
Copy link

How can I do this (occ tables:legacy:transfer:rows --all) when my NexCloud instance is on a hosted server? I tried OCCweb, but that crashes...

@daCaPo
Copy link

daCaPo commented May 13, 2024

How can I do this (occ tables:legacy:transfer:rows --all) when my NexCloud instance is on a hosted server? I tried OCCweb, but that crashes...

I use a PHP script like this:

<?php
$occ = "/usr/bin/env php -d memory_limit=512M [your path to Nextcloud here]/occ ";
# Use relative path to point to occ of your nextcloud installation and append the occ-command
$command = "/usr/bin/env php -d memory_limit=512M [your path to Nextcloud here]/occ tables:legacy:transfer:rows --all
";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Execute Nextcloud occ-command on shared hosting</title>
<style>body { font-family: sans-serif; }</style>
</head>
<body>
<?php echo "<h1>Command</h1><p>" . htmlspecialchars($command) . "</p><h1>Result</h1><p>" . htmlspecialchars(exec($command)) . "</p>"; ?>
</body>
</html>

(Credits go to https://www.ich-war-hier.de/2020/09/21/nextcloud-occ-kommando-auf-webhoster-ohne-ssh-ausfuehren/)

@Jacky-no1
Copy link

Jacky-no1 commented May 18, 2024

How can I do this (occ tables:legacy:transfer:rows --all) when my NexCloud instance is on a hosted server? I tried OCCweb, but that crashes...

I also run on a hosted server.
OCC Web also crashes for me.

But i could connect via Windows PowerShell to SSH
ssh [email protected]
and then put following command that works for me:
php -d memory_limit=512M [your path to Nextcloud here]/occ tables:legacy:transfer:rows --all

First i tried with a .php file on server according this, but it doesnt work:
https://www.ich-war-hier.de/2020/09/21/nextcloud-occ-kommando-auf-webhoster-ohne-ssh-ausfuehren/
Error says: old php version. My Server runs with php 8.3 but in the /user/bin/env is version 7.x set. Dont know how to change it.
Via SSH the command php -v shows the 8.3 version.

@hermann-san
Copy link

Just for People who are on Linux and don't know how to execute the occ command. This is run in the Nextcloud install directory, wherever this may be for you. For me it's /var/www/nextcloud
sudo -u www-data php occ tables:legacy:transfer:rows --all
This has worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending approval or rejection. This issue is pending approval. bug Something isn't working
Projects
None yet
Development

No branches or pull requests