Dustin Falgout
Posts
-
How can I redirect user to a URL after successful Logout? -
How can I redirect user to a URL after successful Logout?I'm using an SSO plugin that I created based on the current Github SSO plugin. I have disabled local login so login will be through my SSO plugin only. I need to redirect the user to a special logout URL after they logout of nodebb so that it logs them out of our SSO service. Is it possible to do through a filter or action?
@baris @psychobunny @julian (sorry hehe )
-
"Invalid File" error when trying to upload an avatar. Affects all users and all image file types.@baris I went through and made sure my custom theme includes the latest changes from lavender. That corrected many of the issues. However, password resets are still not working. I added an issue to github #2731 Do you have any ideas for what may be causing it?
-
"Invalid File" error when trying to upload an avatar. Affects all users and all image file types.@baris Yes, I did restart it several times. This is weird. Also, Since this morning I have received emails from almost 20 users saying that the password reset is not working. When they click the email link it tells them "invalid token". When I check the logs I see a csrf error. Could this be related or is it a separate issue? I am beginning to panic a little because I don't know what's the problem nor how to fix it
Here is the csrf error when the password reset email link is clicked:
14/2 14:03 [1086] - info: [emailer.mailgun] Sent `reset` email to uid 389 14/2 14:19 [1086] - error: /register Error: invalid csrf token at verifytoken (/opt/nodebb/node_modules/csurf/index.js:237:11) at csrf (/opt/nodebb/node_modules/csurf/index.js:100:7) at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5) at next (/opt/nodebb/node_modules/express/lib/router/route.js:110:13) at Route.dispatch (/opt/nodebb/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5) at /opt/nodebb/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/opt/nodebb/node_modules/express/lib/router/index.js:321:12) at next (/opt/nodebb/node_modules/express/lib/router/index.js:261:10) at Function.proto.handle (/opt/nodebb/node_modules/express/lib/router/index.js:166:3) 14/2 14:19 [1086] - error: /login Error: invalid csrf token at verifytoken (/opt/nodebb/node_modules/csurf/index.js:237:11) at csrf (/opt/nodebb/node_modules/csurf/index.js:100:7) at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5) at next (/opt/nodebb/node_modules/express/lib/router/route.js:110:13) at Route.dispatch (/opt/nodebb/node_modules/express/lib/router/route.js:91:3) at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5) at /opt/nodebb/node_modules/express/lib/router/index.js:267:22 at Function.proto.process_params (/opt/nodebb/node_modules/express/lib/router/index.js:321:12) at next (/opt/nodebb/node_modules/express/lib/router/index.js:261:10) at Function.proto.handle (/opt/nodebb/node_modules/express/lib/router/index.js:166:3)
-
"Invalid File" error when trying to upload an avatar. Affects all users and all image file types.@baris Thanks for the quick reply! I made the change but there is no change. The issue is the same
-
"Invalid File" error when trying to upload an avatar. Affects all users and all image file types.I did not notice this while I was staging the site but now that we are live it was discovered that users cannot upload avatars. It gives an "Invalid FIle" error regardless of the file type or size.
This appears in the terminal log:
14/2 05:23 [795] - error: /api/user/lots-0-logs/uploadpicture Error: [[error:invalid-files]] at middleware.validateFiles (/opt/nodebb/src/middleware/middleware.js:108:15) at Layer.handle [as handle_request] (/opt/nodebb/node_modules/express/lib/router/layer.js:82:5) at next (/opt/nodebb/node_modules/express/lib/router/route.js:110:13) at Form.<anonymous> (/opt/nodebb/node_modules/connect-multiparty/index.js:101:9) at Form.EventEmitter.emit (events.js:117:20) at maybeClose (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:557:10) at endFlush (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:552:3) at WriteStream.<anonymous> (/opt/nodebb/node_modules/connect-multiparty/node_modules/multiparty/index.js:617:5) at WriteStream.EventEmitter.emit (events.js:117:20) at fs.js:1601:14
A 500 Error appears in the browser console. Here are the details:
Remote Address:173.236.248.188:80 Request URL:http://forum.antergos.com/api/user/lots-0-logs/uploadpicture Request Method:POST Status Code:500 Internal Server Error Request Headersview source Accept:*/* Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.8,es;q=0.6 Cache-Control:no-cache Connection:keep-alive Content-Length:25331 Content-Type:multipart/form-data; boundary=----WebKitFormBoundarydFjQjP1ZxmA6xrbo Cookie:express.sid=s%3A_qw_9KMYChOMHC6l0fdDevj1b7LKnqCA.MJKxJamVHDxJ7mUoPypTrOG2AmA34aeXhx2TNlkk9rM Host:forum.antergos.com Origin:http://forum.antergos.com Pragma:no-cache Referer:http://forum.antergos.com/user/lots-0-logs/edit User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36 x-csrf-token:de8F0HCi-UWwU_dUREF_CLYUdxTJ2ziFC-ig X-Requested-With:XMLHttpRequest Request Payload ------WebKitFormBoundarydFjQjP1ZxmA6xrbo Content-Disposition: form-data; name="userPhoto"; filename="tux_question.png" Content-Type: image/png ------WebKitFormBoundarydFjQjP1ZxmA6xrbo Content-Disposition: form-data; name="params" {} ------WebKitFormBoundarydFjQjP1ZxmA6xrbo-- Response Headersview source Connection:keep-alive Content-Length:80 Content-Type:application/json; charset=utf-8 Date:Sat, 14 Feb 2015 05:31:39 GMT Server:nginx Vary:Accept-Encoding X-Frame-Options:SAMEORIGIN X-Powered-By:NodeBB
and the response:
{"path":"/api/user/lots-0-logs/uploadpicture","error":"[[error:invalid-files]]"}
File uploading works fine for things within the admin like the site logo and category icons. They also work fine with posts. It seems that only the avatars are having the issue. Any ideas on what could be causing this?
-
Having trouble with a slider script that's possibly related to caching? I'm not sure.@Mega Thanks for taking the time to look at it and offer advice. You were spot on with your answer!
-
Having trouble with a slider script that's possibly related to caching? I'm not sure.I was able to find a resolve the issue. I changed the slider related code in lavender.js to this:
(function () { function doSlick() { if ($('.subcategories').length && !$('.slick-initialized').length) { $('.subcategories').slick({ dots: true, infinite: true, speed: 300, slidesToShow: 4, slidesToScroll: 4 }); } } $(document).ready(function () { doSlick(); }); $(window).on('action:ajaxify.end', function (ev, data) { doSlick(); }); }());
Thanks @psychobunny for your suggestion about the console log. That steered me in the right direction
-
Having trouble with a slider script that's possibly related to caching? I'm not sure.No, well not that I know of. All the other changes I made are CSS. I'll try adding the console.log message to determine if its something in the script that is failing or if its not being fired when ajaxify loading is used.
-
Having trouble with a slider script that's possibly related to caching? I'm not sure.Thanks for the response First, you should know that I've never worked with nodejs coding before I decided to switch our forum to NodeBB about a month ago (my experience is in PHP and Python mostly). The problem is very likely something I did incorrectly.
So the plugin I am using is called Slick. You can find it here: http://kenwheeler.github.io/slick/
I tried a few methods to add it to my fork of lavender. I got it to the state it is in now using a tip @psychobunny gave on a topic I found in this forum. I can't recall which topic. It was made clear that the method was not the "proper" way to do it, but I had couldn't get it to work using the proper method so I tried the shortcut. Anyway, here's what I did.
- I edited the slick script as follows:
Changed this....
(function(factory) { 'use strict'; if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery')); } else { factory(jQuery); } }(function($) { ...
To this:
(function(factory) { /*if (typeof define === 'function' && define.amd) { define(['jquery'], factory); } else if (typeof exports !== 'undefined') { module.exports = factory(require('jquery')); } else { factory(jQuery); }*/ window['Slick'] = factory(window['jQuery']); }(function($) { ...
Next, I added the script filepath to plugin.json. Then I added this to lavendar.js:
(function () { $(document).ready(function () { if ($('.category-page').length) { $('.subcategories').slick({ ...
Thanks in advance for your help. I do appreciate it
Cheers!
-
Having trouble with a slider script that's possibly related to caching? I'm not sure.I'm using a slider script to display child categories. It doesn't work when the page initially loads but works fine after refreshing the page. There are no errors in the browser console or nodebb logs. Any ideas what's causing this behavior?
To see the issue:
- http://antergos.org/forum
- Click the "Applications & Desktop Environments" Category.
- The child categories should be shown in a carousel slider but they won't be.
- Refresh the page and it works fine.
-
Is it possible to display previews from child categories when the parent has no posts?@julian Right, I understand. It just makes it difficult to migrate from a more traditional forum like phpBB (which is the most, or perhaps second-most, used forum software today). I think making it easier to migrate from phpBB's format could only help nodeBB gain more ground Here is the github issue I opened a couple weeks ago. It was closed, though I hope we can reopen it. I'm more than willing to contribute. Let me know if there's anything I can do.
Posts from child categories are not shown on the home page. ยท Issue #2549 ยท NodeBB/NodeBB
This becomes an issue when the parent category does not contain any posts directly, but has several child categories. Is there a way to adjust this behavior? If anyone could point me in the right direction it would be much appreciated! ๐
GitHub (github.com)
-
Is it possible to display previews from child categories when the parent has no posts?No. I'm sorry if my explanation is not clear. Let me try again.. I do not want to display child category blocks on the home page (which is what esiao's template does). I want to display the post previews from child categories inside the parent category block (on the homepage) whenever the parent category has no posts of its own. Does that make sense?
-
Is it possible to display previews from child categories when the parent has no posts?Thanks. I had already reviewed both of those links extensively but they haven't helped. He is displaying groups of child category blocks on the home page under a header which is basically the name of the parent category. That's not what I'm trying to accomplish. As much time as I have now spent on this I honestly think the current template system is not capable of doing what I need.
What I want is to show post previews from child categories on the parent block when the parent itself has no posts. @RazorAxis 's suggestion would completely solve this issue though I'd be happy if I could just get the template system to let me do this in the template without the need for any changes to nodebb core. I'm curious why you guys decided to create your own template system when there are at least two well established options already available. Of course, I know hindsight is always 20/20
-
Is it possible to display previews from child categories when the parent has no posts?You know, I must say that I am really disappointed in the lack of input from the nodebb devs. This post is my second attempt to get a little advice on how I can make this work. My first attempt was on github where I also received no response from the devs. Being one myself, I fully understand the responsibilities of open source software developers. Though usually when a project's documentation is incomplete the developers make themselves available as much as possible to answer questions. Once the documentation is complete, their won't be as many questions like this. I've tried to figure it out on my own for quite some time before reaching out for advice. I had such high hopes for nodebb but now I am not so sure migrating our forum is the right choice at this point. Its disappointing to say the least.
-
Is it possible to display previews from child categories when the parent has no posts?Hi,
I've been trying to figure this out for a couple weeks now (in my spare time) without success. I'm beginning to wonder if what I am trying to do is even possible because everything I've tried fails miserably. I'm migrating our forum from phpBB. Because of the way phpBB is designed, our top level categories do not have any posts in them. They simply hold groups of child categories. This results in the home page having no posts previews shown for the top level categories. With the current template system, how can I get the previews to pull from the child categories (if its even possible)? Any help/advice would be very much appreciated.
Best Regards,
Dustin