Pagination 404 issue.
-
@baris Nope, no deleted topics in that category at all.
If I set it back to infinite scroll, when I try to go beyond 50, I get "Error: Teaser doesn't exist"
It also won't find those topics if I search for a topic that I know is either on page 2 or 3.
Don't think I did the console log wrong, but nothing pops up except 404 not found.
-
Modify the code so it looks like below,
], function (err, data) { if (err) { console.log(err); if (err.message === '[[error:no-privileges]]') { return res.locals.isAPI ? res.json(403, err.message) : res.redirect('403'); } else { return res.locals.isAPI ? res.json(404, 'not-found') : res.redirect('404'); } }
And let me know the error message, "Error: Teaser doesn't exist" might help me debut too. Will take a look.
-
@baris Have done that, nothing in the error log at all, but, the URLs between trying to access page 2 and trying to access page 4 (which works) are different.
?page=3&_=1403984765537 - 404
?page=4 - 200 OKconsole log code is still in if I'm missing what I'm looking for.
-
@baris No errors, just warns.
warn: [plugins/nodebb-plugin-mentions] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. warn: [plugins/nodebb-plugin-mentions] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-mentions". warn: [plugins/nodebb-plugin-spam-be-gone] This plugin may not be compatible with your version of NodeBB. This may cause unintended behaviour or crashing. warn: [plugins/nodebb-plugin-spam-be-gone] In the event of an unresponsive NodeBB caused by this plugin, run ./nodebb reset plugin="nodebb-plugin-spam-be-gone". warn: [plugins/nodebb-plugin-spoilers] staticDir is deprecated, use staticDirs instead
Then starts fine...
-
Ok now change this line
File not found ยท NodeBB/NodeBB
Node.js based forum software built for the modern web - File not found ยท NodeBB/NodeBB
GitHub (github.com)
to
console.log('pid : ' + pid, postData); return next(new Error('Teaser does not exist'));
Im guessing one of the posts got purged somehow but is still in the list of posts for that topic so you are getting that error. Let me know the output of that console.log.
-
@baris Spot on...
info: NodeBB Ready
pid : 10825 { pid: '10825',
uid: 'undefined',
timestamp: '1389195689000',
fields: [ 'pid', 'uid', 'timestamp' ] }
pid : 10825 { pid: '10825',
uid: 'undefined',
timestamp: '1389195689000',
fields: [ 'pid', 'uid', 'timestamp' ] } -
Ok if you are using redis check out that post and see whats going on.
redis-cli hgetall post:10825
I am committing a fix that will stop the crashing. https://github.com/NodeBB/NodeBB/commit/24aa166ed595f89e0917047e1bd47af8e9c1261f.
But you should still check out why that post doesn't have a uid.
-
@baris Thanks, I've got this:
- "editor"
- ""
- "content"
- "Cheers for the tunes, mix is a bit random but I did what I could -ย :teeth: It'll be posted later today or tomorrow."
- "uid"
- "undefined"
- "relativeTime"
- "2014-01-08T15:41:29.000Z"
- "votes"
- "0"
- "deleted"
- "0"
- "timestamp"
- "1389195689000"
- "edited"
- "0"
- "tid"
- "274"
- "pid"
- "10825"
- "reputation"
- "0"
EDIT: Just realised that's a post in the topic I was looking for... Small world. That post was also made by a member who deleted their account on my old forum.
-
Looks like that post doesn't have a valid uid, if you know its poster's uid then you can fix it by.
hset post:10825 uid <theiruid>
If they are deleted then just set their uid to 0 with
hset post:10825 uid 0
I guess thats something the importer should do.