XF 2.0 Cannot access threads

Mr Lucky

Well-known member
On a test forum I'm setting up with version 2

This is not a permissions issue (I think) as permission analysis shows that I should have normal access.

I can see all the forums, and the thread lists, but when I click on a thread I get this:

Oops! We ran into some problems.

Something went wrong. Please try again or contact the administrator.

Can anyone please help?
 
When I look at the code for usage of this phrase, the only place this can be triggered when viewing a thread is this:
PHP:
if ($page > 1)
{
   return $this->redirect($this->buildLink('threads', $thread));
}
else
{
   // should never really happen
   return $this->error(\XF::phrase('something_went_wrong_please_try_again'));
}
Note the should never really happen comment. So that's impressive ;)

This actually happening suggests to me that there are threads which have no posts in them. By which I mean, no posts at all, just empty thread containers with no messages within. Does that sound possible in any way? If you create a new thread, is that viewable? Is the content being imported from elsewhere. or an upgrade of an old XF1 forum?
 
On a test forum I'm setting up with version 2

This is not a permissions issue (I think) as permission analysis shows that I should have normal access.

I can see all the forums, and the thread lists, but when I click on a thread I get this:

Oops! We ran into some problems.

Something went wrong. Please try again or contact the administrator.

Can anyone please help?
This is the same as I am getting at the moment, or a redirect to our 404 page on wordpress
 
Any ideas what this could be or how to fix it?
Absolutely no idea. It’s not possible to have threads which do not have any first post content. So we’d need to know how that happened. E.g. were the threads created automatically by an add on, were they visible in XF1, etc.
 
To be honest, given the uncertain history of what caused that problem, and the lack of similar reports, we'd recommend just re-doing the upgrade from XF1 to XF2 and monitoring it closely for any issues.

Actually, before that, it might be worth rebuilding threads via the tool under Admin > Tools > Rebuild caches. You shouldn't need to rebuild post counters. This will update the first post and last post information. After that is complete, I'd recommend comparing the previously problematic threads with the same threads in XF1 just to make sure those threads definitely appear correctly in XF2.
 
If they worked at some point after upgrading and then they suddenly disappeared, I'd be worried that posts just disappeared from the DB directly.

Unless there was some moderator action taken within the threads, such as by moving all of the posts out? (Where the thread should be deleted but wasn't.)
 
we'd recommend just re-doing the upgrade from XF1 to XF2 and monitoring it closely for any issues.

Not a good option as there are some posts there I need access to.

Actually, before that, it might be worth rebuilding threads via the tool under Admin > Tools > Rebuild caches.

Sadly this disn't help.

I'd recommend comparing the previously problematic threads with the same threads in XF1
Seems to be all threads. Every single one.
 
If they worked at some point after upgrading and then they suddenly disappeared, I'd be worried that posts just disappeared from the DB directly.

Unless there was some moderator action taken within the threads, such as by moving all of the posts out? (Where the thread should be deleted but wasn't.)

No moderator action at all at any time near prior to the issue. back in November (after upgrade to beta) some threads were moved but this didn't cause any issues at the time.
 
Every thread on the site? Look at the xf_post table in the database. It sounds like it's empty then (or at least missing a lot of content).

This might indicate some sort of DB corruption issue.
 
Every thread on the site? Look at the xf_post table in the database. It sounds like it's empty then (or at least missing a lot of content).

This might indicate some sort of DB corruption issue.
Code:
MariaDB [logictest_xf]> SELECT COUNT(*) FROM xf_thread;
+----------+
| COUNT(*) |
+----------+
|     8890 |
+----------+
1 row in set (0.01 sec)

MariaDB [logictest_xf]> SELECT COUNT(*) FROM xf_post;  
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

MariaDB [logictest_xf]>

Now, this test site is hosted on the same server as lots of other sites, 95% are running XF1 or XF2, and NONE of them have the issues Pete is having.
 
Not a good option as there are some posts there I need access to.
Unfortunately given the output that Matt just posted, there's no other option as the posts are gone.

Aside from database corruption I wonder if the table has been overwritten during some sort of database restore. Has anything like that been done?

I'd tend to agree with Matt that it would be odd for just one site out of many to be affected in such a way and equally unlikely that it points to a fault within XF itself as we haven't had any similar reports (the report from Snoopjiggyjigg above seems to be different).

If you could re-do the upgrade and keep a log of any big actions you take on the site, such as any restoration of tables/databases, installation/uninstallation of add-ons etc. then that may help track it down if it happens again. Also, take regular backups so if the issue does re-occur, then you can revert back to that without having to do the upgrade process again.
 
OK, good news, I restored from a backup database (Nov 29) and now the threads are back.

I was prompted to upgrade from 2.0.1 to 2.0.1 which is still very odd. The files are 2.0.1 but the database at 29 Nov must have been 2.0.0

scratch-head.gif
 
I'd tend to agree with Matt that it would be odd for just one site out of many to be affected in such a way and equally unlikely that it points to a fault within XF itself as we haven't had any similar reports

I wonder if the table has been overwritten during some sort of database restore.


I also agree with Matt. All I can think also is that it may have been a corruption that happened during a database restore
 
I was prompted to upgrade from 2.0.1 to 2.0.1
Are you basing that on a similar appearance to the screenshot you posted in the other thread?

1516369435781.webp

Based on this screenshot, it is not saying you're upgrading from v2.0.0 to 2.0.0 (or 2.0.1 now). The value in the bottom right corner comes from the files you have. If the database comes from 2.0.0 but the files are 2.0.1 then both values on the page reading 2.0.1 would be expected.

This isn't actually any different to how it was displayed in XF1 either.
 
Back
Top Bottom